WIP to help develop local node_modules in a Meteor project.
- Local node modules have their own babel setup.
- To dev, you need to:
npm run compile
- Restart Meteor
- That's a pain, so instead, on save, we:
- Run package's babel with it's babel config for just the changed file
- Hotload the changed output file back into Meteor for HMR
- Everything is still rebuilt so a full restart works too.
- Specific package structure:
- local babel installed as a devDependency for the package
npm run compilehas been run at least once before so the output paths all already exist.
In general you want a layout like http://jamesknelson.com/writing-npm-packages-with-es6-using-the-babel-6-cli/ but using a
.babelrc instead of specifying options on the script command line.