My gruntfile :
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
js: {
src: ['http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js', 'js/bootstrap.min.js', 'js/messages.fr.js', 'js/parsley.min.js'],
dest: 'js/prod/concat.js'
},
css: {
src: ['css/bootstrap.min.css', 'css/bootstrap-responsive.min.css', 'css/app.css'],
dest: 'css/prod/concat.css'
}
},
min: {
js: {
src: 'js/prod/concat.js',
dest: 'js/prod/main.min.js'
}
},
cssmin: {
minify: {
expand: true,
src: ['css/prod/concat.css', '!*.min.css'],
dest: 'css/prod/',
ext: '.min.css'
}
}
});
grunt.loadNpmTasks('grunt-contrib-imagemin', 'grunt-contrib-cssmin');
// Default task.
grunt.registerTask('default', ['concat', 'min', 'cssmin']);
};
No matter what I try (removing task, etc) grunt keeps coming at me with the same message "Warning: Task "concat" not found". It's the same if I remove concat : "Warning: Task "min" not found".
I do not understand what is going on.
This just happened to me. Its also important to make sure that after you have npm
-installed a grunt task, you've also registered it in your Gruntfile.
So the end of your gruntfile should have loadNpmTasks
lines kinda like so:
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
// Default task.
grunt.registerTask('default', [ 'concat', 'uglify']);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With