Gruntfile失败,并显示Warning:Task“default”not found
问题描述:
- 这是我的grunt文件。
- 我运行$咕噜默认
-
实际工作中,我想我的index.html的一些端口上,并希望它在CHROM打开直接Gruntfile失败,并显示Warning:Task“default”not found
module.exports = function(grunt) { grunt.initConfig({ connect: { server: { options: { port: 9001, base: { path: 'Dev', options: { index: 'index.html', maxAge: 300000 } } } } }, open: { delayed: { path: 'http://localhost:9001' app: 'Google Chrome' options: { openOn: 'serverListening' } } } }); grunt.registerTask('default', ['connect', 'open']); };
答
你需要下载任务:
grunt.loadNpmTasks('grunt-contrib-connect');