2013-11-28 106 views
0

我想創建一個任務來觀看我所有的scss文件。我使用了「grunt-contrib-watch」和「grunt-contrib-sass」,但它不起作用。指南針手錶與Grunt

我的文件,我的目錄:http://glui.me/?i=pz7vmwu9cfgbzt3/2013-11-28_at_12.46_2x.png/

我的錯誤:

MacBook-Pro-of-username:src username:src$ grunt 
Running "cssmin:minify" (cssmin) task 
File lib/stylesheets/bottom.min.css created. 

Running "watch" task 
Waiting...Bus error: 10 

我咕嚕代碼:

module.exports = function(grunt){ 

    grunt.initConfig({ 

     pkg: grunt.file.readJSON('package.json'), 


     sass: { 
      dist: { 
       files: { 
        'lib/stylesheets/bottom.css' : 'lib/sass/bottom.scss' 
       } 
      } 
     }, 

     watch: { 
      css: { 
       files: '**/*.scss', 
       tasks: ['sass'] 
      } 
     }, 

     cssmin: { 
      minify: { 
       files: [{ 
        'lib/stylesheets/bottom.min.css': ['lib/stylesheets/bottom.css'] 
       }] 
      } 
     } 

    }); 

    grunt.loadNpmTasks('grunt-contrib-watch'); 
    grunt.loadNpmTasks('grunt-contrib-sass'); 

    grunt.registerTask('default', ['watch']); 

} 

回答