I am using the following in a Grunfile.js to copy index.html in the exports directory:
grunt.initConfig({
copy: {
main: {
files: [
{expand: true, src: ['./views/index.html'], dest: 'exports/'},
]
}
}
});
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.registerTask('default', [ 'copy' ]);
What I would like to achieve is placing the file directly in the exports root without the views directory. So the path would be /exports/index.html
.
Is this possible?
Use the flatten
attribute for the file config:
{expand: true, src: ['./views/index.html'], dest: 'exports/', flatten:true},
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments