Configuration

Most API fields are also configurable from a staticbuild.json configuration file. The basic configuration that is created with the setup command is shown below. Currently, jquery, bootstrap and knockout are included with the default setup template.

{ // Salt for any file-name hashing that is based on version number. "versionHash": { "salt": "MDAEaMF8Q8rhwCGQuaeCC4Za9GLHUeZr" }, // Maps url `/bower` to the `bower_components` directory. "pathMap": { "bower": { "fs": "bower_components" } }, // Global context for rendered views. "contextFile": "./view-context.js", // Script and Style Bundles "bundle": { // A default highlight.js theme... "hljs-monokai-sublime": { "styles": [ "/lib/css/monokai-sublime.css" ] }, // jQuery and Bootstrap "jqbs": { "scripts": [ "/bower_components/jquery/dist/jquery.js", "/bower_components/bootstrap/dist/js/bootstrap.js" ] }, // Knockout "ko": { "scripts": [ { "src": "/bower_components/knockout/dist/knockout.js", "min": "/bower_components/knockout/dist/knockout.js" } ] }, // Main bundle - style `site.css` is compiled from `site.less`, which // includes bootstrap. "main": { "scripts": [ "/lib/js/site.js" ], "styles": [ "/lib/css/site.css" ] } // Bundles can be included in your (Jade) template via: // `|!{build.bundles(['jqbs', 'ko', 'main'])}` // During development, src links are used if specified. // Min links, if specified, are used in lieu of minifying the file at // generation time. } }

Copyright @ Devoptix LLC 2016This site built with staticbuild.staticbuild.github.io v0.0.2 (en)  Help