我在git子模块中有整个bootstrap-sass项目。为什么grunt正在看sass / bootstrap / test /并且失败 - 当我只是告诉它查看sass / bootstrap / vendor时?
'use strict';
module.exports = function(grunt) {
grunt.initConfig({
compass: {
dist: {
options: {
sassDir: 'sass',
cssDir: 'style'
},
files: {
'style/bootstrap.css': 'sass/bootstrap/vendor/assets/stylesheets/bootstrap.scss'
}
}
},
watch: {
sass: {
files: [
'sass/bootstrap/vendor/assets/stylesheets'
],
tasks: ['compass']
}
}
});
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', [
'compass',
'watch'
]);
};
$ grunt
:
Running "compass:dist" (compass) task
directory style/bootstrap/templates/project/
directory style/bootstrap/test/dummy_sass_only/
directory style/bootstrap/test/dummy_node_mincer/
directory style/bootstrap/vendor/assets/stylesheets/
directory style/bootstrap/vendor/assets/stylesheets/bootstrap/
directory style/bootstrap/test/dummy_rails/app/assets/stylesheets/
error sass/bootstrap/templates/project/styles.sass (Line 1: File to import not found or unreadable: bootstrap-compass.
答案 0 :(得分:2)
grunt-contrib-compass
与其他grunt任务的工作方式不同,因为您没有指定单个文件。 Compass是一个框架,它有自己的解析文件的约定。因此任务grunt-contrib-compass
只提供了一个通过Grunt配置Compass的界面。
请参阅grunt-contrib-compass的文档中的用法示例:https://github.com/gruntjs/grunt-contrib-compass#example-config