From c2cd918f5bd4ca1fc32b832e34645dccbb878251 Mon Sep 17 00:00:00 2001 From: Uri Goldshtein Date: Tue, 17 Feb 2015 20:28:39 -0800 Subject: [PATCH] (chore): Add packaging for Meteor.js --- .gitignore | 2 ++ README.md | 1 + meteor/override-fastclick.js | 6 ++++++ package.js | 33 +++++++++++++++++++++++++++++++++ 4 files changed, 42 insertions(+) create mode 100644 meteor/override-fastclick.js create mode 100644 package.js diff --git a/.gitignore b/.gitignore index bc063ff5f93..af2746ae217 100644 --- a/.gitignore +++ b/.gitignore @@ -26,5 +26,7 @@ dist .idea +.versions + # Coverage directory used by tools like istanbul coverage/ diff --git a/README.md b/README.md index 378da3a8056..9b7b32acef1 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,7 @@ $ ionic start myproject * The `release` folder of this repository * Ionic CDN: [Latest Release](http://code.ionicframework.com/) * Using bower: `bower install ionic` + * For [Meteor](https://www.meteor.com/) applications: `meteor add driftyco:ionic` - Download the **bleeding edge just-from-master release** from: * Ionic CDN: [Nightly Build](http://code.ionicframework.com/#nightly) * Using bower: `bower install driftyco/ionic-bower#master` diff --git a/meteor/override-fastclick.js b/meteor/override-fastclick.js new file mode 100644 index 00000000000..e7f1d37a246 --- /dev/null +++ b/meteor/override-fastclick.js @@ -0,0 +1,6 @@ +// disable fastclick package in Meteor if included +if (Package.fastclick) { + Package.fastclick.FastClick.notNeeded = function() { + return true; + }; +} diff --git a/package.js b/package.js new file mode 100644 index 00000000000..82d00039cff --- /dev/null +++ b/package.js @@ -0,0 +1,33 @@ +// package metadata file for Meteor.js +var packageName = 'driftyco:ionic'; // https://atmospherejs.com/driftyco/ionic +var where = 'client'; // where to install: 'client' or 'server'. For both, pass nothing. +var version = '1.1.0'; + +Package.describe({ + name: packageName, + version: version, + summary: 'Ionic Framework official Meteor package', + git: 'git@github.com:driftyco/ionic.git' +}); + +Package.onUse(function(api) { + api.versionsFrom(['METEOR@0.9.0', 'METEOR@1.0']); + + api.use('angular:angular@1.4.3', where); + api.use('angular:angular-animate@1.4.3', where); + api.use('angular:angular-sanitize@1.4.3', where); + api.use('angularui:angular-ui-router@0.2.13_3', where); + + api.use('fastclick@1.0.3', 'client', {weak : true}); + + api.addFiles([ + 'release/css/ionic.css', + 'release/fonts/ionicons.eot', + 'release/fonts/ionicons.svg', + 'release/fonts/ionicons.ttf', + 'release/fonts/ionicons.woff', + 'release/js/ionic.js', + 'release/js/ionic-angular.js', + 'meteor/override-fastclick.js' // Stop Meteor's Fastclick in favor of Ionic one + ], where); +});