kalastatic
Static site application framework for prototyping and styleguiding.
Dependencies
Install
$ npm install kalstatic --save
Usage
Convention
Construct your source files, using the template engine name in the file extension. The following example uses the Pug template engine, but others are available (Twig, Mustache, etc).
src/index.html.pug
---
pretty: true
title: Hello World!
---
doctype html
html(lang="en")
head
title= title
body
h1= title
Configuration
KalaStatic can be configured through a kalastatic.yaml
file. The default options are as follows:
base: .
source: src
destination: build
pluginOpts: {}
kss:
builder: null
title: "Styleguide"
homepage: styles/homepage.md
css: ../styles/main.css
source:
- src/components/
- src/styles/
CLI
KalaStatic can be used as a command line interface. The following are some of its commands:
Build
Runs through the KalaStatic build tasks and outputs to the destination folder.
kalastatic build
Start
Starts up a development server through BrowserSync in order to watch and serve KalaStatic. Changes you make to the source will automatically reflect in the browser.
kalastatic start
API
KalaStatic can be used a JavaScript API. Calling KalaStatic()
will build, and return a Promise.
var KalaStatic = require('kalastatic')
KalaStatic('path/to/site').then(function() {
})