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

meteor 0.9 - new package system #52

Closed
stachrom opened this issue Aug 23, 2014 · 10 comments
Closed

meteor 0.9 - new package system #52

stachrom opened this issue Aug 23, 2014 · 10 comments

Comments

@stachrom
Copy link

hi alanning

How do I install the package under meteor 0.9 - without mrt ?

regards roman

@alanning
Copy link
Contributor

Hi Roman,

Hmm, not sure. Roles isn't compatible with the new package system yet so
you can't pull it down automatically.

I saw on the 0.9 meteor-core thread that locally installed packages will
work as normal so you can create a dummy meteor app with 0.8.3 and mrt add roles then copy over the packages/roles directory and manually add
roles to the .meteor/packages file. I think that should work.

Adrian Lanning
Co-Founder, CTO
Share911
P: 203-895-8830
https://share911.com/

On Sat, Aug 23, 2014 at 4:25 PM, roman notifications@github.com wrote:

hi alanning

How do I install the package under meteor 0.9 - without mrt ?

regards roman


Reply to this email directly or view it on GitHub
#52.

@benlavalley
Copy link

I manually added it to my app.

Just ran a git clone on it (git clone https://github.com/alanning/meteor-roles.git, or you can just snag the ZIP), then moved the meteor-roles/roles subfolder into myappname/packages/roles.

I then added it to my app by running 'metoer add roles'.

For some other packages I used this method with, I had to modify package.js to recognize the new naming scheme for dependencies, e.g. modifying appname/collection2/package.js "api.use(['simple-schema'," ...." to "api.use(['aldeed:simple-schema' ....

I struggled a bit getting my app working with a migration from 0.8.x to 0.9.x. "A bit" is putting it very lightly. I decided to just build a new app, migrated my code, and purposefully didn't run mrt at all as I found that would just foul it up -- I grabbed entirely new packages manually with 'meteor add ....' and almost everything from Atmoshpere was supported natively in 0.9 with only a few packages needing the above manual work (namely houston, collection2, roles, and handlebar-helpers.).

@alanning
Copy link
Contributor

@nibbl Thanks for the info! Do you happen to know why roles may be incompatible with 0.9? The atmosphere folk did an automatic conversion but some packages didn't auto-convert successfully (like this one).

Also, based on what you know of modifying the package.js files, do you think its possible to support both pre-0.9 and 0.9 packaging system with the same repo? It would suck to have to try to keep a branch for older Meteor in-sync.

@alanning
Copy link
Contributor

FYI, Arunoda posted a timely hackpad regarding adding 0.9 support for existing packages:

https://hackpad.com/Add-Meteor-0.9-support-for-your-Existing-Packages-P0R7y1PiXlu

@aaronjudd
Copy link

@alanning you can do this to support both:

Package.on_use(function(api) {
  // Dependencies

  // 0.9.0+
  if (api.versionsFrom) {
    // common
   api.use....
  }
  // Pre-0.9.0
  else {
  api.use ....
}

@hellogerard
Copy link

@alanning,

Now that 0.9.0 is out, you should be able to run

mrt migrate-package path/to/old/meteor-roles  path/to/new/alanning:roles

It will create that alanning:roles folder, and you can directly commit those changes. Bump the version in package.js, and run meteor publish, and BOOM, 0.9.0 compatible :-)

Source

@alanning
Copy link
Contributor

OK, I pushed a new version - v1.2.12 - and published to the new packaging servers and it seems to be working...

$ meteor create foo
$ cd foo
$ meteor add alanning:roles
$ meteor

...and nothing blows up. Please have a try and see if its working for you guys.

@benlavalley
Copy link

Working for my app!

@aaronjudd
Copy link

Looks good here as well. Thanks!

@alanning
Copy link
Contributor

Thanks for the help!

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

5 participants