我在gruntfile.js上有这个简单的代码:
module.exports = function (grunt)
{
require("load-grunt-tasks")(grunt); // npm install --save-dev load-grunt-tasks
grunt.initConfig({
babel: {
options: {
sourceMap: true
},
dist: {
files: {
"dist/app.js": ["src/app.js"]
}
}
}
});
grunt.registerTask("default", ["babel"]);
};
Run Code Online (Sandbox Code Playgroud)
但是在运行时告诉我这个错误:
Warning: Task "babel" not found. Use --force to continue.
Aborted due to warnings.
Process finished with exit code 3
Run Code Online (Sandbox Code Playgroud)
有帮助吗?切勿从ecmascript 6转换为5 :(
我的文件:
http://www.mediafire.com/download/nabq78bs323u47b/DemoBable.zip