spatools/grunt-html-build

Question: Is it possible for each src file to have its own destination? info inside.

Closed this issue · 1 comments

I have a structure that looks like this:

views/home/IndexTemplate.html
views/authorized/IndexTemplate.html

The issue is, currently the dest is simply a directory to dump all the generated files; but what I want is to each land in their respective folders. something like:

views/home/Index.html
views/authorized/Index.html

I tried something like this before reading more into the documentation

src: 'views/**/IndexTemplate.html',
dest: 'views/**/Index.html',

but it couldn't parse /** as a directory. Do you have any suggestions here? is there a way to configure grunt-html-build to work under these conditions? or should I just change the file names to be unique?

Thanks,
Lucas

Hello Lucas,
Sorry for my reply delay.
Actually, you already can do this by using Extended Files Configuration:

htmlbuild: {
    multiple: {
            files: [{
                expand: true,
                pwd: "views/",
                src: ["**/IndexTemplate.html"],
                dest: "views/",
                ext: ".html"
            }]
        }
}