javascript - new to grunt - warning: task "concat, uglify" not found -


as title says i'm new grunt. following tutorial located at: http://24ways.org/2013/grunt-is-not-weird-and-hard/. older tutorial seems work same. have installed "grunt-contrib-concat" , "grunt-contrib-uglify" , can run both individually. when run grunt, following error: warning: task "concat, uglify" not found. use --force continue. aborted due errors. i've been looking around , can't seem figure out. files follows:

gruntfile.js:

module.exports = function(grunt) {              // 1. configuration goes here              grunt.initconfig({                 pkg: grunt.file.readjson('package.json'),                  concat: {                      dist: {                         src: [                             'js/libs/*.js', // js in libs folder                             'js/controls.js', // specific file                         ],                         dest: 'dist/built.js',                     }                 },                  uglify: {                     build: {                         src: 'js/build/production.js',                         dest: 'js/build/production.min.js',                     }                 },              });              // 3. tell grunt plan use plug-in.             grunt.loadnpmtasks('grunt-contrib-concat');             grunt.loadnpmtasks('grunt-contrib-uglify');              // 4. tell grunt when type 'grunt' terminal.             grunt.registertask('default', ['concat, uglify']);          }; 

package.json:

{   "name": "grunt_libsass_example-project",   "version": "0.1.0",   "devdependencies": {     "grunt": "~0.4.1",     "grunt-contrib-concat": "^0.5.1",     "grunt-contrib-uglify": "^0.9.1"   } } 

your passing in 1 string registertask task list. should comma separated list of strings like:

grunt.registertask('default', ['concat', 'uglify']); 

you're getting error because it's looking task named 'concat, uglify'.


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -