grunt-contrib-sass在Windows中不起作用
我正在尝试使用Grunt将scss文件编译为css,但由于未知原因,我失败了。
这是我的Gruntfile.js
module.exports = function(grunt) { grunt.initConfig({ bower: { install: { options: { targetDir: 'dependencies', cleanup: true, layout: 'byComponent' } } }, sass: { foundation: { files: { 'a.css': 'a.scss' } } } }); grunt.loadNpmTasks('grunt-bower-task'); grunt.loadNpmTasks('grunt-contrib-sass'); grunt.registerTask('dependencies', ['bower:install']); grunt.registerTask('assets', ['sass:foundation']); };
我收到以下错误:
> grunt assets Running "sass:foundation" (sass) task Warning: spawn C:\Windows\system32\cmd.exe;C\MySQL\bin ENOENT Use --force to continue Aborted due to warnings.
我究竟做错了什么?
我解决了这个问题,安装了“grunt-contrib-sass”:“^ 0.8.1”(这是一个旧版本,但它对我很有用)
"devDependencies": { "grunt": "^0.4.5", "grunt-contrib-sass": "^0.8.1" }