Grunt task for rendering Swig templates.
Task for rendering Swig templates
This plugin requires Grunt
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-swig2 --save-dev
Run this task with the
grunt swig command.
Task targets, files and options may be specified according to the grunt Configuring tasks guide.
Locals that will be passed to each template when rendering. If this is a function, then it will be called once per target with no args. If this is an array, then the values will be merged into a single object.
Object containing custom Swig filters, where the key is the filter name and the value is the filter function. Example:
options:filters:// Makes strings more excitingreturn input + "!!!";
Object containing custom Swig tags, where the key is the tag name and the value is a object that must contain
blockLevel flags may also be passed, but are optional.
Also, you may pass a
ext key as well, which will add a Swig extension with the name of this tag.
options:tags:tagName:// ...// ...ends: trueblockLevel: trueext: anythingHere
A hash of Swig options.