Thanks to visit codestin.com
Credit goes to github.com

Skip to content

stakit/monote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Stability NPM version

Installation

npm i monote

Usage

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 = kit

To start the development server run:

$ monote build.js

To build the site, simply pass an output path as an argument:

$ monote -o ./public build.js

This 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

About

Small development server for Stakit

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published