From 05a8d7fad1ee2899f2af07928bf0517fb84d6534 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E5=A4=A9?= Date: Mon, 3 Aug 2020 11:01:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A0=B9=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E8=AF=BB=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 +++ index.js | 6 +++--- package.json | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 955c523..d3fea81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # 更新日志(Changed Logs) +## [3.0.2] 2020-08-03 +- 代码优化 + ## [3.0.0] 2019-08-05 - 删除libsass, 改用`node-sass`(需要手动全局安装) diff --git a/index.js b/index.js index 72a41b8..144a25e 100644 --- a/index.js +++ b/index.js @@ -163,10 +163,10 @@ function __init__() { } } - // 以配置文件所在目录为根目录(workspace) - if (fs.exists(configFile)) { - options.workspace = path.dirname(configFile) + options.workspace = wsDir + // 有配置文件时, 优先使用配置文件的配置 + if (fs.exists(configFile)) { let tmp = JSON.parse(fs.cat(configFile).toString()) Object.assign(options, tmp) diff --git a/package.json b/package.json index 4f4ce6a..bcb54ba 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "scss-to-css", "displayName": "scss-to-css", "description": "🔥 The easiest way to compile scss file to css. And autoprefixer at the same time.", - "version": "3.0.1", + "version": "3.0.2", "publisher": "yutent", "author": "Yutent [@yutent]", "icon": "logo.png",