alanshaw / grunt-include-replace

Grunt task to include files and replace variables. Allows for parameterised includes.
MIT License
200 stars 45 forks source link

In search for a flatten option #49

Closed dominikwilkowski closed 9 years ago

dominikwilkowski commented 9 years ago

Hey there,

I am looking to move from grunt-includes to you package but have come across one issue I may not be able to fix. In grunt-includes you have a flatten option that ignores the folder structure of the processed HTML files and starts with that folder. That way my folder with unprocessed HTML files can be rendered and go into a PROD folder.

I have my unprocessed files in whatever/folder/index.html Currently I get PROD/whatever/folder/index.html What I want is: PROD/index.html

and every respective file with folders so: My unprocessed files in whatever/folder/sub/index.html Currently I get PROD/whatever/folder/sub/index.html What I want is: PROD/sub/index.html

What do you think?

gorhgorh commented 9 years ago

ha ha thanks for this issue, i was thinking i was not finding the flatten opt, mainly cause there isn't one :)

alanshaw commented 9 years ago

Does the flatten option not work? http://gruntjs.com/configuring-tasks#building-the-files-object-dynamically

dominikwilkowski commented 9 years ago

yeah thanks I didn't realise you had to have expand: true, set for this to work. Cheers