0
我安装了Atom编辑器并尝试通过插件grunt-runner运行grunt任务。但失败。操作系统:Windows 8.1Grunt via atom将不起作用
我的步骤是:
1)NPM
2)获得咕噜
npm install -g grunt-cli
3)安装青菜,插件
npm install grunt-contrib-sass --save-dev
安装的node.js
4)创建package.json文件包含
在尝试通过Atom的咕噜亚军插件推出咕噜module.exports = function(grunt) {
grunt.initConfig({
sass: { // Task
dist: { // Target
options: { // Target options
style: 'expanded'
},
files: { // Dictionary of files
'styles/main.css': 'styles/main.scss' // 'destination': 'source'
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.registerTask('default', ['sass']);
};
结果:
{
"name": "test-app",
"version": "0.1.0",
"devDependencies": {
"grunt": "~0.4.5",
"grunt-contrib-sass": "^0.9.2"
}
}
5)添加Gruntfile.js
Grunt exited: code 1.
但如果我使用“通过终端执行它咕噜“ - 命令它的作品完美
我有同样的问题,在终端一切都像一个魅力,但在咕噜咕噜我得到:“Grunt退出:代码1”。但在我的情况下,我没有安装构建插件。有任何想法吗? –