0.0.2 • Published 8 years ago

jade-bundle-inject v0.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

bundleJade(src_dir, dest_dir, options) ⇒ Promise

Utitlity to compile all source jade templates and inject them into index.html in destination directory

Kind: global function

ParamTypeDefaultDescription
src_dirstringthe source directory to search for jade template files
dest_dirstringthe destination directory to save index.html after compiling
optionsobject
options.compileIndexbooleantrueexpect to compile jade index file as well as templates
options.indexSrcPathstring"index.html.jade"the name of the index file to inject rendered template bundle into. If options.compileIndex=true this file will be compiled before the templates are injected. The file itself should contain a comment <!-- :jade templates: --> Note: indexSrcPath should be relative to src_dir to indicate where to inject the template files.
options.ignorePathsarrayArray"index.html.jade", "index.jade"ignore these paths when searching for template files in src_dir. Note: Paths are relative to src_dir
options.prettybooleantruewhether to prettify the jade rendered output
options.localsobjectdata to inject into the templates at compile time keys are the filenames relative to src_dir, values are an object of key:value pairs. Example To inject locals into <src_dir>/templates/my-template.html.jade' use locals: {"templates/my-template.html.jade":{greeting: "Hello World"}} and refer to it in the template as greeting