template
An easy-to-use Lo-Dash template processing library.
Quickstart
Install with npm:
Methods
template
By default the template()
method expects the following parameters:
For example, the following:
results in:
template.read
To read a file from the file system before processing, use template.read
:
template.copy
A convenience method for synchronously copying files from A to B.
Pass {process: false}
to the options disable template processing.
Options
Template supports all Lo-Dash template options, as well as a few extras.
custom delimiters
All of the options from the delims library may be passed to the options object.
For example, this:
Results in:
Valid templates
Any of the following expressions may be used in templates:
3rd Party Libs
All of the methods from underscore.string are available on the _.str
object. Additionally, all of the non-conflicting methods are available on the _
Lo-Dash namespace. See the [underscore.string documentation][str-docs] for more details.
Authors
Jon Schlinkert
Brian Woodward
License
Copyright (c) 2014 Jon Schlinkert, Brian Woodward, contributors. Released under the MIT license
[str-docs]: https://github.com/epeli/underscore.string#nodejs-installation
Last updated