lrload-chronic

0.1.0 • Public • Published

lrload-chronic

A babel - watchify - reactliveload in chronic (with sample dev server)

Example

// build.js
var chron = require('chronic');
var lrload = require('lrload-chronic');
 
chron('live', chron
  .source('./src/main.js')
  .dest('static'),
  lrload
)
$ node build live -ds

How to Use

Include a source file for the entry point in browserify/watchify, and a destination directory. This is defined in chronic:

chron.source('<path-to-entry>').dest('<path-to-directory>')

The compiled file will be renamed bundle.js by default, this can be overwritten in source:

chron.source('<path-to-entry>', '<custom-name>')

For an inline sourcemap use -d or --debug in the command prompt:

$ node <path-to-chronic-file> <task-name> --debug

Clone this repo for an example use case with server enabled. Just run: node build -dso (after npm install) and edit the files in src -- reactliveload magic will happen :)

Caveats

Watchify will watch everything in the browserify-pipeline by default, so it's not necessary to use chronic's --watch on any of those files (weird things will happen probably, I haven't tried it).

Credits

Example taken from livereactload

License

MIT

Package Sidebar

Install

npm i lrload-chronic

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • rnbwd