Skip to content

Commit f8fb23f

Browse files
committed
fix: package resolve
1 parent 181dae8 commit f8fb23f

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

packages/vue-quill/src/assets/snow.styl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ backgroundColor = #fff
55
inactiveColor = #4B5563
66
shadowColor = #D1D5DB
77
textColor = #4B5563
8-
// Additional colors
8+
// Additional color
99
backgroundHoverColor = #F3F4F6
1010
backgroundActiveColor = #DBEAFE
1111

scripts/utils.js

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,34 @@ const chalk = require('chalk')
33
const path = require('path')
44
const { gzipSync } = require('zlib')
55
const { compress } = require('brotli')
6+
const packagesDir = path.resolve(__dirname, '../packages')
67

7-
const targets = fs.readdirSync('packages').filter((f) => {
8-
const packageDir = path.resolve(__dirname, '..', 'packages', f)
9-
if (!fs.statSync(packageDir).isDirectory()) {
8+
const targets = fs.readdirSync(packagesDir).filter((f) => {
9+
const pkgDir = path.resolve(__dirname, '..', 'packages', f)
10+
if (!fs.statSync(pkgDir).isDirectory()) {
1011
return false
1112
}
12-
const packagePath = path.resolve(packageDir, 'package.json')
13-
if (!fs.existsSync(packagePath)) {
13+
const pkgPath = path.resolve(pkgDir, 'package.json')
14+
if (!fs.existsSync(pkgPath)) {
1415
return false
1516
}
16-
const pkg = require(packagePath)
17+
const pkg = require(pkgPath)
1718
if (pkg.private && !pkg.buildOptions) {
1819
return false
1920
}
2021
return true
2122
})
2223

23-
const targetAssets = fs.readdirSync('packages').filter((f) => {
24-
const packageDir = path.resolve(__dirname, '..', 'packages', f)
25-
if (!fs.statSync(packageDir).isDirectory()) {
24+
const targetAssets = fs.readdirSync(packagesDir).filter((f) => {
25+
const pkgDir = path.resolve(__dirname, '..', 'packages', f)
26+
if (!fs.statSync(pkgDir).isDirectory()) {
2627
return false
2728
}
28-
const packagePath = path.resolve(packageDir, 'assets.config.json')
29-
if (!fs.existsSync(packagePath)) {
29+
const pkgPath = path.resolve(pkgDir, 'assets.config.json')
30+
if (!fs.existsSync(pkgPath)) {
3031
return false
3132
}
32-
const assetsConfig = require(packagePath)
33+
const assetsConfig = require(pkgPath)
3334
if (assetsConfig.private && !assetsConfig.css) {
3435
return false
3536
}

0 commit comments

Comments
 (0)