e-picas / grunt-nunjucks-render

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

env option results in 'loader.getSource is not a function' #2

Open barnabycolby opened 8 years ago

barnabycolby commented 8 years ago

When trying to set a custom environment via the env option, I always receive the following warning: loader.getSource is not a function

My nunjucks_render config looks like this:

module.exports = {
    options: {
        env: (function () {
            var nunjucks = require('nunjucks');
            return new nunjucks.Environment();
        }())
    },
    main: {
        ...
    }
};

Is this a bug or am I doing something incorrectly?

barnabycolby commented 8 years ago

I have also noticed that most of the tests are failing, looks like the template_path variable is missing, but I'm not sure why, could be related?