优化过滤
parent
aea38548c7
commit
962427e233
7
index.js
7
index.js
|
@ -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
|
||||||
|
|
|
@ -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",
|
||||||
|
|
Loading…
Reference in New Issue