How to grunt-uglify multiple script files while keeping folder structure

后端 未结 5 1747

I have not found a good way to grunt-uglify multiple script files spread over multiple folders while keeping the folder structure including the uglified files intact. The on

5条回答
  •  抹茶落季
    2020-12-23 23:18

    Similar to the answer by @DioNNiS, but stores minified files in the same folder:

        uglify: {
            all: {
                files: [{
                    expand: true,
                    cwd: 'path/to/js/',
                    src: ['*.js', '!*.min.js'],
                    dest: 'path/to/js/',
                    ext: '.min.js'
                }]
            }
        }
    

提交回复
热议问题