【问题标题】:Output specific file name of css file grunt-contrib-compass输出css文件的具体文件名 grunt-contrib-compass
【发布时间】:2017-10-06 04:56:47
【问题描述】:

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

实际结果 /specialdir/themes/index.css

期望的结果 /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
      }
    }
  },

有什么想法吗?

【问题讨论】:

    标签: css angularjs sass compass grunt-contrib-compass


    【解决方案1】:

    您需要将源文件重命名为 my-theme.scss 以获取 my-theme.css。浏览 the source 似乎这是默认行为。

    编码愉快!

    【讨论】:

    • 哈,就是这样!简单得可笑
    猜你喜欢
    • 2014-02-09
    • 2023-03-27
    • 2012-09-18
    • 1970-01-01
    • 2015-01-02
    • 2014-06-13
    • 2015-10-18
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多