From cacae37b023d81c70d472a5cc158ab28ea4c39df Mon Sep 17 00:00:00 2001 From: jirkakrepl Date: Wed, 12 May 2021 11:06:46 +0200 Subject: [PATCH 1/2] refactor: use jQuery as a weak dependency (similar as Blaze) jQuery now can be added from CDN or a Meteor package --- README.md | 7 +++++++ package.js | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ec1c098..215b593 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,13 @@ Iron.Location ============================================================================== Reactive urls that work with IE8/9 and modern pushState browsers. +## Installation +This package has a weak dependency on jQuery (similar as Blaze), +so you can add jQuery to your Meteor app from a [CDN](https://code.jquery.com/) or a [Meteor package](https://atmospherejs.com/meteor/jquery): +``` +meteor add jquery +``` + ## Example ```javascript diff --git a/package.js b/package.js index 04f5802..36b1b0f 100644 --- a/package.js +++ b/package.js @@ -10,7 +10,7 @@ Package.on_use(function (api) { api.use('underscore'); api.use('tracker'); - api.use('jquery'); + api.use('jquery', { weak: true }); api.use('iron:core@1.0.11'); api.imply('iron:core'); From 2c8d8fe1f00eff047392ea27a5d393eb39d985da Mon Sep 17 00:00:00 2001 From: jirkakrepl Date: Wed, 18 Aug 2021 15:35:42 +0200 Subject: [PATCH 2/2] refactor: updated package to work with meteor 2.3 --- package.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package.js b/package.js index 36b1b0f..34ef940 100644 --- a/package.js +++ b/package.js @@ -5,7 +5,7 @@ Package.describe({ git: 'https://github.com/eventedmind/iron-location.git' }); -Package.on_use(function (api) { +Package.onUse(function (api) { api.versionsFrom('METEOR@0.9.2'); api.use('underscore'); @@ -19,17 +19,17 @@ Package.on_use(function (api) { api.use('appcache', {weak: true}); - api.add_files('lib/utils.js', 'client'); - api.add_files('lib/state.js', 'client'); - api.add_files('lib/location.js', 'client'); + api.addFiles('lib/utils.js', 'client'); + api.addFiles('lib/state.js', 'client'); + api.addFiles('lib/location.js', 'client'); api.export(['urlToHashStyle', 'urlFromHashStyle'], 'client', {testOnly: true}); }); -Package.on_test(function (api) { +Package.onTest(function (api) { api.use('iron:location'); api.use('tinytest'); api.use('test-helpers'); - api.add_files('test/location_test.js', 'client'); + api.addFiles('test/location_test.js', 'client'); });