2014-05-21 42 views
0

我有一個git子模塊中的整個bootstrap-sass項目。爲什麼咕嚕地看着sass/bootstrap/test /根本沒有 - 當我只告訴它看看sass/bootstrap/vendor?爲什麼Grunt忽略我的文件路徑?

'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. 

回答

2

grunt-contrib-compass作品比其他咕嚕任務不同。 Compass是一個有自己的解決文件約定的框架。所以任務grunt-contrib-compass只是提供了一個通過Grunt配置Compass的界面。

見咕嚕-contrib請羅盤的文檔的使用範例:https://github.com/gruntjs/grunt-contrib-compass#example-config

+0

不知道如何解決它? –

+0

如果你想單獨使用'grunt-contrib-sass'編譯sass文件。指南針,它的框架沒有解決方法。 –