javascript - Grunt: Task "grunt-bower" not found -
i want install package grunt-bower grunt using npm install grunt-bower --save
. after install, see package grunt-bower
inside node_modules
. here gruntfile.js
:
module.exports = function(grunt) { grunt.initconfig({ bower: { dev: { dest: 'public', js_dest: 'public/javascripts', css_dest: 'public/stylesheets' } }, watch: { source: { files: ['sass/**/*.scss', 'views/**/*.jade'], tasks: ['sass'], options: { livereload: true, // needed run livereload } } } }); grunt.loadnpmtasks('grunt-bower'); grunt.loadnpmtasks('grunt-contrib-watch'); grunt.registertask('default', ['grunt-bower']); };
i have register on official page : grunt.loadnpmtasks('grunt-bower');
when run grunt
command, meet error:
warning: task "grunt-bower" not found. use --force continue.
i don't know why. wrong ? please tell me.
thanks :)
you've defined task want run bower
, not grunt-bower
therefore,
grunt.registertask('default', ['grunt-bower']);
should be
grunt.registertask('default', ['bower']);
Comments
Post a Comment