meteor-hotload-accelerator
v1.0.16
Published
Used by gadicc:ecmascript-hot meteor package
Downloads
8
Readme
meteor-hotload-accelerator
See https://atmospherejs.com/gadicc/ecmascript-hot.
Development
Because hot-build
will connect to an existing accelerator if one exists, we can start the accelerator before running Meteor to develop it independently from the build process, saving much pain:
- Don't start Meteor yet
- For now, edit the consts in
src/dev.js
andnpm run compile
. npm run dev
- Run Meteor
On any file change, we'll kill the accelerator, run babel and launch the new accelerator. hot-build
will notice the disconnect and try reconnect, and send the new instance all the data it needs to carry off where the old one left off. The client will also reconnect in time.
Dev via Meteor
If you need to edit code from the accelerator, you should adjust hot-builds
's package.js
to Npm.depend()
on your local files. You'll see an example commented out above the currently published version which I use for my home dir and you can adjust accordingly.
Updating this way is a pain, but here's what to do:
npm run compile
in accelerator dir- Change
hot-build
'spackage.js
(e.g. insert a new line) to get Meteor to pull in the new dep. You should seegadicc:hot-build: updating npm dependencies -- meteor-hotload-accelerator...
- Since the accelerator is now a single long-lived process, you need to restart Meteor too.