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",