monote v0.5.2
monote
Small development server for Stakit
Work on static websites using Stakit without constantly regenerating them. Monote keeps the outputted files in memory, serves and automatically rebuilds them, so you can work and preview the site faster.
Installation
npm i monoteUsage
Export your kit without calling output() and let monote handle the rest. Just change your application or your Stakit build chain and monote will automatically rebuild the site using the new version.
// build.js
var stakit = require('stakit')
var kit = stakit()
.routes(() => ['/'])
.render((route, state) => `${route}`)
module.exports = kitTo start the development server run:
$ monote build.jsTo build the site, simply pass an output path as an argument:
$ monote -o ./public build.jsThis is useful if you don't want to check whether the build file was required or called directly.
context._files and context._watch
Monote will automatically watch all files from context._files that have a source. It will also watch all files in context._watch, which is a simple, flat array of paths.
CLI
usage
monote [opts] <entry>
options
--output, -o build the site to the specified path
--help, -h show this help text
--port, -p server port
--version, -v print version
examples
start server
monote build.js
start server on port 3000
monote build.js -p 3000
build site without dev server
monote -o ./public build.js