vendredi 6 juin 2014

uglifier and concat grunt plugins don't work togheter


Vote count:

0




i am wondering what is wrong with my grunfile.js file



module.exports = function(grunt) {

// 1. All configuration goes here
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),

concat: {
dist: {
src: [
'js/libs/*.js', // All JS in the js folder
'js/global.js',

],
dest: 'js/production/production.js',
}
}

uglify: {
build: {
src: 'js/production/production.js',
dest: 'js/production/production.min.js'
}
}



});

// 3. Where we tell Grunt we plan to use this plug-in.
grunt.loadNpmTasks('grunt-contrib-concat', 'grunt-contrib-uglify');


// 4. Where we tell Grunt what to do when we type "grunt" into the terminal.
grunt.registerTask('default', ['concat', 'uglify']);

};


i keep having this error: "Task uglify not found. use --force to continue."


i'm following coyer's tutorial (http://ift.tt/1pZsOV0) but i can't figure out how to add a chunk of code AFTER another.


the concat plugin works alone, but as i add the uglify one, i get the error. it's probably syntax but i can't figure it out (i moved the code around, repeated the whole block etc.) nothing works.


thanks for your help!



asked 1 min ago






Aucun commentaire:

Enregistrer un commentaire