Skip to content

Commit

Permalink
fix: package resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
luthfimasruri committed Mar 28, 2021
1 parent 181dae8 commit f8fb23f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/vue-quill/src/assets/snow.styl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ backgroundColor = #fff
inactiveColor = #4B5563
shadowColor = #D1D5DB
textColor = #4B5563
// Additional colors
// Additional color
backgroundHoverColor = #F3F4F6
backgroundActiveColor = #DBEAFE

Expand Down
25 changes: 13 additions & 12 deletions scripts/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,34 @@ const chalk = require('chalk')
const path = require('path')
const { gzipSync } = require('zlib')
const { compress } = require('brotli')
const packagesDir = path.resolve(__dirname, '../packages')

const targets = fs.readdirSync('packages').filter((f) => {
const packageDir = path.resolve(__dirname, '..', 'packages', f)
if (!fs.statSync(packageDir).isDirectory()) {
const targets = fs.readdirSync(packagesDir).filter((f) => {
const pkgDir = path.resolve(__dirname, '..', 'packages', f)
if (!fs.statSync(pkgDir).isDirectory()) {
return false
}
const packagePath = path.resolve(packageDir, 'package.json')
if (!fs.existsSync(packagePath)) {
const pkgPath = path.resolve(pkgDir, 'package.json')
if (!fs.existsSync(pkgPath)) {
return false
}
const pkg = require(packagePath)
const pkg = require(pkgPath)
if (pkg.private && !pkg.buildOptions) {
return false
}
return true
})

const targetAssets = fs.readdirSync('packages').filter((f) => {
const packageDir = path.resolve(__dirname, '..', 'packages', f)
if (!fs.statSync(packageDir).isDirectory()) {
const targetAssets = fs.readdirSync(packagesDir).filter((f) => {
const pkgDir = path.resolve(__dirname, '..', 'packages', f)
if (!fs.statSync(pkgDir).isDirectory()) {
return false
}
const packagePath = path.resolve(packageDir, 'assets.config.json')
if (!fs.existsSync(packagePath)) {
const pkgPath = path.resolve(pkgDir, 'assets.config.json')
if (!fs.existsSync(pkgPath)) {
return false
}
const assetsConfig = require(packagePath)
const assetsConfig = require(pkgPath)
if (assetsConfig.private && !assetsConfig.css) {
return false
}
Expand Down

0 comments on commit f8fb23f

Please sign in to comment.