2017-10-05 45 views
0

我想从我的grunt-contrib-compass作业中指定CSS文件的输出名称。默认输出和index.css文件。css文件的输出特定文件名grunt-contrib-compass

实际结果 <%= yeoman.app%>/specialdir /主题/ index.css

所需的结果 <%= yeoman.app%>/specialdir /主题/我的主题的.css

Gruntfile.js

.... 
compass : { 
    // specialjob here 
    specialjob : { 
    options : { 
     sassDir : '<%= yeoman.app %>/specialdir/my-theme', 
     cssDir : '<%= yeoman.app %>/specialdir/themes', // should output into this folder 
     relativeAssets : false, 
     assetCacheBuster : false, 
     raw : 'Sass::Script::Number.precision = 10\n' 
    }, 
    dist : { 
     options : { 
     generatedImagesDir : '<%= yeoman.app %>/specialdir/images/generated' 
     } 
    }, 
    server : { 
     options : { 
     sourcemap : true 
     } 
    } 
    }, 

任何想法?

回答

1

您需要将源文件重命名为my-theme.scss才能获得my-theme.css。通过the source看起来像这是默认行为。

快乐编码!

+0

哈,就是这样!可笑简单 –