0
我有d:/了projectA
工作SASS預處理器的Node.js通過咕嚕
Gruntfile.js
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
//Read the package.json (optional)
pkg: grunt.file.readJSON('package.json'),
// Metadata.
meta: {
basePath: '../',
srcPath: '../',
deployPath: '../'
},
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> ',
// Task configuration.
concat: {
options: {
stripBanners: true
},
dist: {
src: ['<%= meta.srcPath %>engine/css/mycss1.css', '<%= meta.srcPath %>engine/css/mycss2.css'],
dest: '<%= meta.deployPath %>engine/css/00myfinal.css'
}
},
//the Sass Task
sass: {
sass_my_files : {
files : {
//"the Destination " : " the source files"
"../engine/css/mystyle3.css" : "../engine/css/mysass1.scss",
},
options : {
"style":"compressed",
"precision":"7"
},
},
},
});
// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-sass');
// Default task
grunt.registerTask('default', ['concat','sass']);
};
的package.json
{
"name": "Test-Project",
"version": "0.1.0",
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-concat": "~0.1.3"
}
}
安裝在我的「紅寶石的Windows 」。
插入下面的命令:
npm install ruby-sass
我完成這一切。但在運行「咕嚕」的命令,我得到錯誤:
You need to have Ruby and Sass installed and in your path for this task to work.
誰能告訴爲什麼我的控制檯顯示錯誤它成功運行的「CONCAT」任務後,並顯示在「錯誤SASS'任務?