sormy / bs-systemjs-hot-reloader

BrowserSync SystemJS / JSPM hot reload plugin with support of CSS, SCSS, SASS, LESS, Stylus, React and JavaScript
MIT License
3 stars 0 forks source link

BrowserSync SystemJS Hot Reloader

This plugin is compatible with hot reloader which is compatible with SystemJS v0.19.x only for now

Features

TODO

Installation

npm install browser-sync bs-systemjs-hot-reloader --save-dev
jspm install npm:systemjs-hot-reloader-ex --dev

Usage

Please refer to systemjs-hot-reloader usage to setup client side reloader.

This example will hot reload *.scss and *.jsx and will do full reload for index.html and jspm.config.js.

var browserSync = require('browser-sync');
var bsSystemHotReloader = require('bs-systemjs-hot-reloader');

var bs = browserSync.create();

bs.watch([
  'index.html',
  'jspm.config.js'
]).on('change', bs.reload);

bs.use(bsSystemHotReloader, {
  files: [
    'src/**/*.scss',
    'src/**/*.jsx',
  ]
});

bs.init({
  server: '.',
  online: false,
  open: false,
  reloadOnRestart: true
});

Options