template
Render templates using any engine. Supports, layouts, pages, partials and custom template types. Use template helpers, middleware, routes, loaders, and lots more. Powers assemble, verb and other node.js apps.
Table of contents
(Table of contents generated by verb)
Install
Install with npm
npm i template --save
Features
- ~100% test coverage (as of May. 12, 2015) with ~500 unit tests
- Render templates with any engine, including any consolidate,
transformers, or any compatible engine. Or, create your own!
- Create custom template types. Built-in types are
page
, layout
and partial
, but you can create special types for any use case. - Custom loaders. Loaders are simple functions that change how templates are loaded and can be used with template types, or individual templates.
Getting started
var Template = require('template');
var template = new Template();
API
Go to the API documentation
User docs
(Table of contents generated by verb)
Related projects
Libraries that are used in Template:
- async: Higher-order functions and common patterns for asynchronous code
- config-cache: General purpose JavaScript object storage methods.
- en-route: Routing for static site generators, build systems and task runners, heavily based on express.js routes… more
- engine-cache: express.js inspired template-engine manager.
- helper-cache: Easily register and get helper functions to be passed to any template engine or node.js… more
- layouts: Wrap templates with layouts. Layouts can be nested and optionally use other layouts.
- loader-cache: Register loader functions that dynamically read, parse or otherwise transform file contents when the name… more
Running tests
Install dev dependencies:
npm i -d && npm test
Build docs
Install devDependencies:
npm i -d && verb
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Authors
Jon Schlinkert
License
Copyright (c) 2014-2015 Jon Schlinkert
Released under the MIT license.
This file was generated by verb-cli on May 12, 2015.