How to configure grunt-contrib-uglify to minify files while retaining directory structure
问题 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 } } });