In case I have several subdirectories in the "js" directory in the Gruntfile example below and want to save the subdirectories in another destination directory, how do I do this?
For instance,
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 showed * /. js, but even if I explicitly specify one subdirectory such as js / xyz / *. js, then it also does not copy the directory structure, instead it seems to put the files inside a subdirectory in the mini-directory / folder in the example. What am I missing here? Please, help.
Thanks,
Paddy
Paddy source share