优化过滤

pull/19/head
宇天 2019-12-02 09:21:43 +08:00
parent aea38548c7
commit 962427e233
2 changed files with 6 additions and 3 deletions

View File

@ -129,8 +129,7 @@ const Compiler = {
// 过滤不编译的文件 // 过滤不编译的文件
if (options.exclude) { if (options.exclude) {
let exp = new RegExp(options.exclude, 'i') if (options.exclude.test(origin)) {
if (exp.test(origin)) {
return return
} }
} }
@ -178,6 +177,10 @@ function __init__() {
} }
} }
if (options.exclude) {
options.exclude = new RegExp(options.exclude, 'i')
}
prefixer = postcss().use( prefixer = postcss().use(
autoprefixer({ autoprefixer({
browsers: options.browsers browsers: options.browsers

View File

@ -2,7 +2,7 @@
"name": "scss-to-css", "name": "scss-to-css",
"displayName": "scss-to-css", "displayName": "scss-to-css",
"description": "🔥 The easiest way to compile scss file to css. And autoprefixer at the same time.", "description": "🔥 The easiest way to compile scss file to css. And autoprefixer at the same time.",
"version": "3.0.0", "version": "3.0.1",
"publisher": "yutent", "publisher": "yutent",
"author": "Yutent [@yutent]", "author": "Yutent [@yutent]",
"icon": "logo.png", "icon": "logo.png",