简体   繁体   中英

Output specific file name of css file grunt-contrib-compass

I'm trying to specify an output name of the CSS file from my grunt-contrib-compass job. The default outputs and index.css file.

Actual Result <%= yeoman.app %>/specialdir/themes/index.css

Desired Result <%= yeoman.app %>/specialdir/themes/my-theme.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
      }
    }
  },

Any ideas?

You will need to rename your source file to my-theme.scss to get my-theme.css . Looking through the source seems like this is the default behavior.

Happy coding!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM