Skip to content

Commit c84470d

Browse files
committed
fix: build css unhandled promise
1 parent 9895952 commit c84470d

File tree

2 files changed

+7
-26
lines changed

2 files changed

+7
-26
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/buildAssets.ts

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,17 @@ npm run assets:build -- vue-quill
5151
}
5252

5353
async function buildAssets(target: string) {
54-
const rootDir = path.resolve(__dirname, '..')
5554
const pkgDir = path.resolve(__dirname, `../packages/${target}`)
5655
const assets = require(path.resolve(pkgDir, 'assets.config.json'))
5756

5857
// only build published packages for release
5958
if (isRelease && assets.private) return
6059
if (!assets.css.length) return
60+
console.log(
61+
chalk.cyan(`\n>>>>>>>>>>>>>>>>>>>> BUILD ASSETS <<<<<<<<<<<<<<<<<<<<`)
62+
)
6163

62-
assets.css.forEach(async (css: any) => {
64+
await assets.css.forEach(async (css: any) => {
6365
const input = path.resolve(pkgDir, css.input)
6466
const inputExt = path.extname(input)
6567
const output = path.resolve(pkgDir, css.output)
@@ -70,30 +72,9 @@ npm run assets:build -- vue-quill
7072
)
7173

7274
if (inputExt === '.styl' || inputExt === '.css') {
73-
if (!prodOnly) {
74-
console.log(
75-
chalk.cyan(`${input}${path.relative(rootDir, output)}...`)
76-
)
77-
execa.sync('stylus', [input, '-o', output])
78-
console.log(
79-
chalk.green(
80-
`created: ${chalk.bold(path.relative(rootDir, output))}\n`
81-
)
82-
)
83-
}
84-
75+
if (!prodOnly) await execa('stylus', [input, '-o', output], { stdio: 'inherit' })
8576
// create production build
86-
if (!devOnly) {
87-
console.log(
88-
chalk.cyan(`${input}${path.relative(rootDir, outputProd)}...`)
89-
)
90-
execa.sync('stylus', [input, '-o', outputProd, '-c'])
91-
console.log(
92-
chalk.green(
93-
`created: ${chalk.bold(path.relative(rootDir, outputProd))}\n`
94-
)
95-
)
96-
}
77+
if (!devOnly) await execa('stylus', [input, '-o', outputProd, '-c'], { stdio: 'inherit' })
9778
} else {
9879
console.log(chalk.redBright(`File extention not supported: ${input}`))
9980
}

0 commit comments

Comments
 (0)