2014-12-05 176 views
0

我想這樣的創建目標,外部青菜咕嚕任務內的目標(與咕嚕聲 - 薩斯):無法創建

咕嚕/ sass.js:

'use strict'; 

module.exports = { 
    alpha: { 
     options: { 
      includePaths: ['bower_components/foundation/scss'] 
     }, 
     dist: { 
      options: { 
       outputStyle: 'compressed' 
      }, 
      files: { 
       'css/app.css': 'scss/app2.scss' 
      } 
     } 
    } 
}; 

Gruntfile.js:

module.exports = function (grunt) { 
require('load-grunt-config')(grunt); 
}; 

我無法正常工作。只有當我重新編寫sass.js文件到以下咕嚕編譯成CSS:

module.exports = { 
    options: { 
    includePaths: ['bower_components/foundation/scss'] 
    }, 
    dist: { 
    options: { 
    outputStyle: 'compressed' 
    }, 
    files: { 
    'css/app.css': 'scss/app.scss' 
    } 
    } 
}; 

我怎麼能創造這些目標,所以我可以執行像「咕嚕青菜:阿爾法」命令,這樣我就可以創建多個模板。

回答

0

之所以能夠通過改變咕嚕/ sass.js這個解決它:

'use strict'; 

module.exports = { 
    options: { 
     includePaths: ['bower_components/foundation/scss'] 
    }, 
    alpha: { 
     options: { 
      outputStyle: 'compressed' 
     }, 
     files: { 
      'css/alpha.css': 'scss/app_alpha.scss' 
     } 
    }, 
    beta: { 
     options: { 
      outputStyle: 'compressed' 
     }, 
     files: { 
      'css/beta.css': 'scss/app_beta.scss' 
     } 
    } 
};