alanshaw / grunt-include-replace

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

Flatten destination output #61

Closed nikkwong closed 8 years ago

nikkwong commented 8 years ago

Hi,

Is it possible to flatten the output of the files in the dest folder? My templates are nested relative to the grunt file into something like /src/templates/index.html so by declaring

dest: 'dist';

the output is

dist/src/templates/index.html,

where i'd prefer

dist/index.html

Thanks.

alanshaw commented 8 years ago

You can use the cwd option for this: http://gruntjs.com/configuring-tasks#building-the-files-object-dynamically

wizzyfx commented 8 years ago
        includereplace: {
            development: {
                options: {},
                files: [
                    {
                        src: 'some/dir/*.html',
                        dest: 'targetdir/',
                        flatten: true,
                        expand:true
                    }
                ],
            }
        }