It would be great if we with meteor could use meteor to build and publish to npm, a solution would be to enable a prerelease script to build a dist/ folder that we could publish, similar to how react-mounter have done and Tracker.Component. Reducing all that boilerplate would be great for all of us to transition to npmjs.
A new meteor command for this could be added to package.json also, that would run when you type npm publish, super smart right?
Adding this functionality to Meteor would simplify and reduce the number of files we use to create an npm publication.
Totally agree - the amount of boilerplate you need to publish a package to NPM these days is terrible. It would be awesome if there was a way to do this via Meteor. Even better if there was a way to specify the Meteor build tool as a dev dependency in an NPM package, just like Babel.
Yeah, just today I experienced the issue of not having the luxury of watching files in npm, I don’t want to configure this, I don’t even know how to enable some auto watching and building thing for npm.
Let’s take what was awesome with Meteor packages and give it to npm!
@sashko, slightly OT but related, are you guys tracking publicly anywhere potential issues on migrating? I keep coming across stuff that I forget to write down, I did https://meteor.hackpad.com/Blocking-Meteor-packages-to-NPM-amw2BmWSAoJ now but it definitely isn’t covering the things I’ve actually come across.
All source is in src and npm publish uses Babel to compile the code into the root then publishes. Some scripts exist to build to other module formats. It is also JSPM-ready. The prepublish also builds a global.js file, for people who want a global file. npm clean will clean the build files. It works, for now.
I’ve seen other ones too. Mine doesn’t have file watching yet.