0

I know I can uglify multiple files into one like this:

uglify: {
    dist: {
        files: {
            'Scripts/build.js': ['Scripts/*.js']
        }
    }
}

But what if a want to uglify multiple files without bundling and without writing each file - one to one map.

Something like this:

uglify: {
    dist: {
        files: {
            'Scripts/*.min.js': ['Scripts/*.js']
        }
    }
}

Is it possible with either uglify or yui comressor?

4

1 回答 1

2

我希望这有帮助:

grunt.initConfig({
    uglify: {
      test: {
        files: [{
            expand: true,
            src: '*.js',
            dest: 'Scripts',
            cwd: 'Scripts',
            ext: '.min.js'
        }]
      }
    }
});
于 2013-05-01T12:21:06.177 回答