提示错误:D:\grunt-in-action\grunt-empty>grunt copyLoading "Gruntfile.js" tasks...ERROR>> ReferenceError: grunt is not definedWarning: Task "copy" not found. Use --force to continue.我的Gruntfile.js内容如下:'use strict'//grunt的基本框架module.exports=function(grunt){//引组件reqire("load-grunt-tasks")(grunt);reqire("time-grunt")(grunt);//配置项目路径var config={app:'app',dist:'dist'};};//开始任务配置grunt.initConfig({//引入config设置config:config,copy:{dist:{src:'<%= config.app %>/index.html',//源文件dest:'<%= config.dist %>/index.html'//目标文件}}});我的package.json:{ "name": "grunt-empty", "version": "1.0.0", "description": "learn grunt by the empty project", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [ "grunt", "empty", "merge" ], "author": "zrx", "license": "ISC", "devDependencies": { "grunt": "^0.4.5", "grunt-contrib-copy": "^0.8.0", "load-grunt-tasks": "^3.1.0", "time-grunt": "^1.1.0" }}
- 1 回答
- 0 关注
- 2094 浏览
添加回答
举报
0/150
提交
取消