Can I tell UglifyJS to only compress and mangle all files except some which I only want concatenated?
问题 Is it possible to specify and array of files that I want compressed and mangled (default Uglify behavior), but also a list of files that should not be touched, just concatenated? Thanks. 回答1: You can solve this in different ways. I'm posting an extended example to illustrate what one can do: uglify: { doAll: { options: { banner: '// <%= pkg.name %> - v<%= pkg.version %> - ' + '<%= grunt.template.today("yyyy-mm-dd HH:mm:ss") %>\n\n', mangle: { except: [ // mangle is true for all else besides