metalsmith-livereload
Starts a livereload server and injects client side livereload script before </body>
to all .html
-files.
Install
npm install metalsmith-livereload
Usage
// metalsmith-changed ;
Here is a full example with http serving, watching files, building only [modified files] and livereloading:
const Metalsmith = ;const changed = ;const nodeStatic = ;const livereload = ;const watch = ;const open = ; const DIR = __dirname + '/test/fixtures/'; /** * Build with metalsmith. */const build = { console; // .use(expensivePlugin()) // ie markdown -> html ;}; /** * Serve files. */var serve = DIR + 'build';; /** * Watch files. */;// watch(DIR + 'templates/**/*', build(true)); // force build of all files /** * Open browser. */;