jstransformers / jstransformer-nunjucks

Nunjucks support for JSTransformers.
http://npm.im/jstransformer-nunjucks
MIT License
6 stars 6 forks source link

Add root directory #16

Closed RobLoach closed 7 years ago

RobLoach commented 7 years ago

Doesn't work, yet. Will need some tweaks.

@ismay Know what's wrong?

ismay commented 7 years ago

I think it's because of this line. You're assigning nunjucks.configure to env and using that to render, so the nunjucks.configure on line 42 has no effect because here the env settings are used for rendering.

Manually setting var envpath = 'test/root'; fixes the test, so it does seem like setting the path is the solution. So it should probably be set around here. Not sure why just setting opts.path wouldn't fix it as well though. Does that get overwritten by opts.filename?