carlitoplatanito / gulp-nunjucks-render

[Gulp](https://github.com/wearefractal/gulp) plugin to render [Nunjucks](http://mozilla.github.io/nunjucks/) templates
149 stars 33 forks source link

compiles to the same file extension #33

Closed kamlekar closed 8 years ago

kamlekar commented 8 years ago

I was having hard time on compiling files to more than one extension. For example, I have three files, one with .php extension (having html + php code in it) and other two with .html extension. When I compiled these files, all three files were compiling with extension .html. So instead, I made modifications which will let the files to compile as it is with the user provided extension when the user hadn't mention the "ext" option.

kristijanhusak commented 8 years ago

This looks ok, but it has a minor BC break, according to tests. Can you add one more option, something like inheritExtension or whatever, that will be false by default, and if it is false, it will fallback to html, like it did before. If you set it to true, it does your logic. That way you can use it as you want just with adding that flag, and noone else would be influenced with the change.

kamlekar commented 8 years ago

Hi @kristijanhusak please check the new updated pull request. Thanks.