gruntjs - Configuring grunt for uglify -
i using gruntfile running uglify task 2 separate modules. both modules configured in same gruntfile as:
uglify: { ac: { dist: { options: { mangle: false, // separate target mangled output report: 'min', // reports actual minified size banner: '<%= banner %>' }, files: { 'dist/<%= pkg.name %>_ac.min.js': ['<%= concat.ac.dest %>'] } }, mangled: { options: { mangle: true, report: 'gzip', banner: '<%= banner %>' }, files: { 'dist/<%= pkg.name %>_ac.2.min.js': ['<%= concat.ac.dest %>'] } } }, lib: { files: { 'dist/<%= pkg.name %>_lib.min.js': ['<%= concat.lib.dest %>'] }, mangled: { files: { 'dist/<%= pkg.name %>_lib.2.min.js': ['<%= concat.lib.dest %>'] } } }, } grunt.registertask('ac', ['uglify:ac:dist']); when run above grunt file, runs without error dont output. not sure if way of configuring correct.
okay here's answer limited info in question;
the way have gruntfile.js file set looking files in concat task don't seem have included. if can't find these files wont output anything.
my guess copied of sample gruntfile.
specifically section ['<%= concat.ac.dest %>'] explained in documentation:
this tells uglify create file within
dist/contains result of minifying javascript files. here use<%= concat.dist.dest %>uglify minify file concat task produces.
if don't have concat task specified or being called, there no output files run uglify on there no output. either check concat called grunt.registertask('ac', ['concat', 'uglify:ac:dist']); , producing output (if have tast set up) or change location of js files wish uglify are.
'dist/<%= pkg.name %>_ac.min.js': ['/path/to/yourjavascriptfile.js']
Comments
Post a Comment