meteor / meteor-feature-requests

A tracker for Meteor issues that are requests for new functionality, not bugs.
Other
89 stars 3 forks source link

Extract non-meteor dependent code to meteor scoped NPM packages #339

Open znewsham opened 5 years ago

znewsham commented 5 years ago

Many meteor packages don't require knowledge of the meteor context, or global variables (or could be refactored minimally to support this).

These packages could with relative ease be moved to NPM, in fact this has been done on two occassions, the meteor-* packages and meteor-standalone-*. Unfortunately, the meteor-* packages (with some exceptions) require passing in a Meteor object to the modules default export, and the meteor-standalone-* packages are very out of date.

I'd like to suggest that Meteor starts publishing these meteor packages that can easily be extracted to NPM to @meteor scoped npm packages. For backwards compatibility, the existing meteor packages could then wrap (and expose as necessary) exports from these NPM packages.

I think this would be good in general, but the specific reason I would like this is with my recent efforts to extract blaze to NPM (https://bitbucket.org/znewsham/meteor-blaze/src) while it does work, it relies on many of these old npm extractions.

I'm happy to do the work required to extract the code to an NPM style package, however someone at MDG will need to create the @meteor scope (if it doesnt exist) and publish the packages to it.

KoenLav commented 5 years ago

@benjamn I think this fits in nicely with decreasing the scope of Meteor.