Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Meteor 1.1 #68

Open
alanning opened this issue Mar 14, 2016 · 0 comments
Open

Support for Meteor 1.1 #68

alanning opened this issue Mar 14, 2016 · 0 comments

Comments

@alanning
Copy link

Just tried it with my production app and had a bit of trouble getting it to work since we still use Meteor 1.1.

Here's what I had to do to get it working:

  • change the versions in package.js to Meteor 1.1 equivalents.
  • use addFiles instead of addAssets.

Here's the git diff:

$ git diff
diff --git a/package.js b/package.js
index 57341a8..f274b78 100644
--- a/package.js
+++ b/package.js
@@ -20,8 +20,13 @@ Npm.depends({
 });

 Package.onUse(function (api) {
-  api.use(["mongo-livedata@1.0.9", "webapp@1.2.3", "ejson@1.0.7", "promise@0.5.1"], "server");
-  api.use("underscore@1.0.4", ["server", "client"]);
+  var both = ['client', 'server'];
+
+  api.versionsFrom("METEOR@1.1");
+
+  api.use(['underscore'], both);
+
+  api.use(["mongo-livedata", "webapp", "ejson", "promise"], "server");
   api.use(["iron:router@0.9.4||1.0.0"], {weak: true});

   api.addFiles([
@@ -35,14 +40,14 @@ Package.onUse(function (api) {
     'server/index.js'
   ], 'server');

-  api.addAssets([
+  api.addFiles([
     "app/autoUpdater.js",
     "app/main.js",
     "app/menu.js",
     "app/package.json",
     "app/preload.js",
     "app/proxyWindowEvents.js"
-  ], "server");
+  ], "server", {isAsset: true});

   api.addFiles(['client/index.js'], "client");

Should be able to support both without issue with some feature checking.

I'll put together a PR in a bit if you guys don't get to it first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant