-
-
Notifications
You must be signed in to change notification settings - Fork 272
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
Package management for Meteor-agnostic packages in Meteor, using jspm. #275
Comments
I've never worked with Meteor but it looks interesting and seems to have with Atmosphere a large package repository. One argument of them against jspm seems to be that the registry is too small. But actually this registry isn't mandatory in case the package doesn't need some special package overwrites. But if there is a Meteor endpoint for jspm which correctly translates the jspm install meteor:accounts-password
# Will then automatically fetch the dependencies from the Atmosphere registry
underscore
meteor
npm-bcrypt
... or # install iron:router
jspm install meteor:iron/router So there is actually no worry about the jspm registry as they could still use their own registry. Having this Meteor endpoint for jspm would also mean that they don't have to write a wrapper in order to support jspm. And to create local aliases for their packages within the // package.js
api.use('iron=iron:[email protected]'); // looks more like jspm syntax
// or if they prefer
api.use('iron:[email protected]').as('iron');
// some.js
// and import iron in their js files with
import iron;
// or with the normalized name
import meteor:iron/layout But as I've never used Meteor I can't say what actually happens behind the scenes of these api calls. But the big benefit for them when using jspm would be of course that they can use SystemJS right away and don't have to write their own ES6 compatible .. so far my quick brainstorming in the morning :) |
In Meteor it seems they're defining the order of how files shall be loaded in the The nice thing about such plugin would be that they can use packages formatted as ES6, AMD, or CJS together or with their own modules and then step by step update the packages to consists only out of ES6 modules if they wish to. And the Edit: Actually in case of Meteor a build step within the endpoint just as for npm packages would make more sense. So upon installing the packages the endpoint will merge all files in the order defined by the |
@subesokun Thanks for the interesting take! This would make There's a problem with Meteor where if someone wants to use jQuery in their Meteor project, then they have to create a "wrapper" package for jQuery and put it on Atmosphere. This means that for every non-meteor package (e.g. jQuery, Underscore, Bootstrap, etc) a new package in Atmosphere needs to be created to allow that external library to be imported into the Meteor app using the This is highly inefficient because there are thousands of meteor-agnostic packages that would need to be wrapped up and put on Atmosphere, polluting Atmosphere with a bunch of wrapper packages. What I think would be nice is a new package on Atmosphere that can import third party meteor-agnostic libraries into your meteor app, from a single configuration file that the package will read. Behind the scenes, the package might use So basically Meteor users would do something like meteor add username:meteor-agnostic-loader then the user would create a configuration file, probably using standard Meteor |
@trusktr thanks so much for looking into this stuff, it is appreciated, and great that you are opening up these discussions. Note though that these are hard problems to tackle and to make real progress most likely requires larger support. |
Closing for now as there is nothing active happening here, but a Meteor endpoint would be very interesting to explore at some point in future (@crisptrutski). |
Hi @guybedford There's some discussion at MeteorCommunity/discussions#1 on preventing from having to create wrapper packages for meteor-agnostic libraries. Nothing technical yet, just ideas. Meteor is so nice, but since it uses it's own package management system, every meteor-agnostic package has to be wrapped in a Meteor package then shipped on atmospherejs.com. I'm still learning about Meteor myself, so I'm not ready to try to propose a working solution, but I have a feeling jspm might be the tool to use for this. I just wanted to open this issue to have an official place for discussion if needed.
The text was updated successfully, but these errors were encountered: