Name: metalsmith-simplewatch
Owner: Particle
Description: A development server for Metalsmith.
Created: 2015-07-01 21:18:50.0
Updated: 2015-07-01 21:18:50.0
Pushed: 2018-01-03 18:33:32.0
Size: 9
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A development server for Metalsmith.
install metalsmith-simplewatch
The watch
function starts a developments server and rebuilds when source files are modified.
watch = require('metalsmith-simplewatch')
h({
ildFn: build,
ildPath: path.resolve(__dirname, './build/'),
cPath: path.resolve(__dirname, './src/'),
tion build() {
talsmith().build()
buildFn
Function
The build function. Will be invoked every time a watched file is modified. Required.
buildPath
String
The absolute path to your build directory. Required.
pattern
String|Array<String>
A [pattern][multimatch] to filter source files. Default '**/*'
.
port
Number
The port for the development server to listen on. Default 8000
.
srcPath
String
The absolute path to your source directory. Serves as the root watch directory. Required.
m test
MIT License, see LICENSE for details.