e-picas / grunt-nunjucks-render

A Grunt plugin to parse Nunjucks templates
Apache License 2.0
3 stars 2 forks source link

Added modifyEnv option allowing easy environment modification #4

Closed barnabycolby closed 7 years ago

barnabycolby commented 8 years ago

Improving on the existing env option by adding a new modifyEnv option. The option takes a function of the following form:

function (env) {
    ...
    return env;
}

This allows custom environments to be created much more easily than when using the env option, as well as allowing the custom environment to benefit from the extra template_date and template_path variables.