0.1.2 • Published 9 years ago

metalsmith-watcher v0.1.2

Weekly downloads
2
License
MIT
Repository
-
Last release
9 years ago

metalsmith-watch

Build Status Dependencies

Installation

npm install metalsmith-watcher

Usage

Default Usage

metalsmith-watcher will watch and rebuild all source files upon change

var Metalsmith = require('metalsmith');
var watch = require('metalsmith-watcher');

Metalsmith(__dirname)
.source('src/')
.use(watch())
.build(cb);
Patterns

(coming soon) .. specify what to watch and what to rebuild

Metalsmith(__dirname)
.use(watch([
  [['src/scss/\*'], ['src/scss/main.scss’]], // Rebuilds main.scss when scss files change
  [['templates/\*', '!templates/ignorethis.file'], ['src/\*.md']] // Ignores 'ignorethis.file'
]))
.build();

To Test

npm test