1.0.4 • Published 1 year ago
@cchet/tengine v1.0.4
tengine
start
# install
npm i @cchet/tengine
// pages - the directory containing templates
// out - the directory containing the output files
// public - static files copy to out directory
// helpers_functions - helper functions can be invoked in templates
require("@cchet/tengine")("pages", "out", "public", {
max:(a,b)=>{...} //helpers_functions
})
how to use it.
- Template files
- All files in pages with extension '.html' and not start with '_' will be templates
- Except for templates, other files will be copied to the output directory.
Root Template file
Leaf Template file
Nodejs script
Helpers functions
Template file with variable name