@kps3/hbs-template-builder

2.0.2 • Public • Published

Template Builder

Usage

Folder Structure

.
├── ...
├── templates
│   ├── components               # Components/partials used within the templates
│   |   ├── header.hbs
│   ├── layouts                  # Layouts (must use `{{{yield}}}` to output template body)
│   |   ├── default.hbs
│   └── index.hbs                # Templates
└── ...

Code

const templateCompiler = require('@kps3/hbs-template-builder');

templateBuilder({
  path: './templates',         // relative path to template directory
  layout: 'default.hbs',       // layout file name
  output: './dist',            // relative path to output build directory
  watch: false,                // watch files for changes
  buildComponents: false       // build component files like templates (useful for testing components)
});

CLI

$ hbs-template-builder --path=./templates --layout=default.hbs --output=./dist --buildComponents --watch

Readme

Keywords

none

Package Sidebar

Install

npm i @kps3/hbs-template-builder

Weekly Downloads

1

Version

2.0.2

License

MIT

Unpacked Size

9.08 kB

Total Files

7

Last publish

Collaborators

  • jrutheiser