vitkarpov / grunt-nunjucks-2-html

Compiles nunjucks templates *right* into HTML
MIT License
35 stars 11 forks source link

Add filters support #10

Closed ArmorDarks closed 9 years ago

ArmorDarks commented 9 years ago

It would be really nice to see support of custom filters

They are quite easily can be added as follow:

var env = nunjucks.configure(options.paths);

env.addFilter('filterNameHere', function(str, testParam) {
    return str + testParam + 'test';
});

However, it needs a bit more love in terms of Task support, so users could define any number of filters they need