gpt4 book ai didi

javascript - Grunt postcss 任务排除文件

转载 作者:太空宇宙 更新时间:2023-11-04 09:44:42 26 4
gpt4 key购买 nike

我正在尝试设置 postcss grunt 任务,我想在 css/ 中的所有文件上运行该任务,default.css,如何排除某些文件?

这是我的任务

        options: {
processors: [
require('autoprefixer')(),
require('cssnext')(),
require('precss')()
]
},
dist: {
src: 'css/*.css',
exclude: 'css/default.css'

}

}

最佳答案

checkout docs .

Paths matching patterns that begin with ! will be excluded from the returned array. Patterns are processed in order, so inclusion and exclusion order is significant.

options: {
processors: [
require('autoprefixer')(),
require('cssnext')(),
require('precss')()
]
},
dist: {
src: ['css/*.css', '!css/default.css']
}

关于javascript - Grunt postcss 任务排除文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39575052/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com