In case I have multiple subdirectories under 'js' directory in the example Gruntfile posted below, and want to retain the subdirectories under a different destination directory, how do I do it?
For e.g.
module.exports = function (grunt) {
grunt.initConfig({
// define source files and their destinations
uglify: {
files: {
src: 'js/**/*.js', // source files mask
dest: 'minJs/', // destination folder
expand: true, // allow dynamic building
flatten: true, // remove all unnecessary nesting
}
}
});
// load plugins
grunt.loadNpmTasks('grunt-contrib-uglify');
// register at least this one task
grunt.registerTask('default', [ 'uglify' ]);
};
In this case, I have shown */.js, but even if I explicitly specify a single subdirectory like js/xyz/*.js then also it is not copying the directory structure, instead it seems to put the files within subdirectory under minJs/ folder in the example. What am I missing here? Please help.
Thanks,
Paddy