【问题标题】:How to use grunt stylus to compile each file to the original folder?如何使用 grunt stylus 将每个文件编译到原始文件夹?
【发布时间】:2015-07-31 02:51:32
【问题描述】:

我想要做的是将手写笔文件编译到手写笔文件所在的同一文件夹中。 喜欢

files: { 'src/**/*.css':'src/**/*.styl']

即使我在文档网 https://github.com/gruntjs/grunt-contrib-stylus 上尝试过相同的配置

options: {
  relativeDest: 'out'
},
files: [{
  src: ['src/components/*/*.styl'],
  ext: '.css'
}]

失败了。

谁能帮帮我?

【问题讨论】:

  • 你能解释一下你所说的失败是什么意思吗?
  • 意思是,不行,在根目录下生成一个未定义的文件

标签: gruntjs stylus


【解决方案1】:

试试这个:

            files: [{
                expand: true,
                cwd: 'src/components',
                src: ['**/*.styl'],
                dest: 'src/components',
                filter: 'isFile',
                ext: '.css'
            }]

【讨论】:

    猜你喜欢
    • 2016-03-13
    • 2012-12-14
    • 1970-01-01
    • 2015-12-17
    • 2014-02-02
    • 1970-01-01
    • 2016-05-31
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多