broccoli-swiffer
v0.1.1
Published
A Broccoli plugin for Swiffer the Dust linter
Downloads
3
Maintainers
Readme
broccoli-swiffer
A Broccoli plugin which uses swiffer to lint Dust templates.
How to install?
$ npm install broccoli-swiffer --save-dev
How to use?
In your Brocfile.js
:
var dustLint = require('broccoli-swiffer');
var outputTree = dustLint(inputTree, options);
Options
extensions
: An array of file extensions to process, default['tl', 'dust']
.throwOnError
: {boolean} cause exception error if linting failsrules
: {Object} the rules that .swifferrc would contain
var dustLint = require('broccoli-swiffer');
var outputTree = dustLint(inputTree, {
extensions: ['dustjs'] // look for files.dustjs instead
rules: [{
name: 'it is a trap',
description: 'stop using @bar',
target: {
type: '@',
matches: 'bar'
}
}],
// fail on lint error, but not in prod
throwOnError: someAppThing.isProd ? false : true
});