Skip to content

Commit 9895952

Browse files
committed
fix: cleanup the codes
1 parent 7929e69 commit 9895952

File tree

7 files changed

+24
-155
lines changed

7 files changed

+24
-155
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 color
8+
// Additional colors
99
backgroundHoverColor = #F3F4F6
1010
backgroundActiveColor = #DBEAFE
1111

scripts/build.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ npm run build -- vue-quill
1313
npm run build -- vue-quill --formats cjs
1414
```
1515
*/
16-
(() => {
16+
(async () => {
1717
const fs = require('fs-extra')
1818
const path = require('path')
1919
const execa = require('execa')
@@ -41,7 +41,7 @@ npm run build -- vue-quill --formats cjs
4141
const commit =
4242
args.commit || execa.sync('git', ['rev-parse', 'HEAD']).stdout.slice(0, 7)
4343

44-
run()
44+
await run()
4545

4646
async function run() {
4747
if (isRelease) {
@@ -102,8 +102,17 @@ npm run build -- vue-quill --formats cjs
102102

103103
if (hasTypes && pkg.types) await generateTypes(target)
104104
if (buildAssets && assets.css) {
105-
const buildAssetsRunner = path.resolve(__dirname, 'buildAssets.ts')
106-
await execa('npx', ['ts-node', buildAssetsRunner, target])
105+
const buildAssetsTs = await path.resolve(__dirname, 'buildAssets.ts')
106+
await execa(
107+
'npx',
108+
[
109+
'ts-node',
110+
buildAssetsTs,
111+
target,
112+
isRelease ? '--release' : ''
113+
],
114+
{ stdio: 'inherit' }
115+
)
107116
}
108117
}
109118

scripts/buildAssets.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ To specify the package assets to build, simply pass its name
77
npm run assets:build -- vue-quill
88
```
99
*/
10-
(() => {
10+
(async () => {
1111
const fs = require('fs-extra')
1212
const path = require('path')
1313
const chalk = require('chalk')
@@ -29,10 +29,8 @@ npm run assets:build -- vue-quill
2929
// const nextVersion: string =
3030
// args.nextVersion ||
3131
// require(path.resolve(__dirname, '..', 'package.json')).version
32-
// const commit: string =
33-
// args.commit || execa.sync('git', ['rev-parse', 'HEAD']).stdout.slice(0, 7)
3432

35-
run()
33+
await run()
3634

3735
async function run() {
3836
if (isRelease) {

scripts/dev.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ npm run dev -- vue-quill --formats cjs
1515
__DEV__=false npm run dev
1616
```
1717
*/
18-
(() => {
18+
(async () => {
1919
const execa = require('execa')
2020
const { fuzzyMatchTarget } = require('./utils')
2121

@@ -26,7 +26,7 @@ __DEV__=false npm run dev
2626
const sourceMap: boolean = args.sourcemap || args.s
2727
const commit = execa.sync('git', ['rev-parse', 'HEAD']).stdout.slice(0, 7)
2828

29-
execa(
29+
await execa(
3030
'rollup',
3131
[
3232
'-wc',

scripts/devAssets.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ To specify the package to build, simply pass its name
77
npm run assets:build -- vue-quill
88
```
99
*/
10-
(() => {
10+
(async () => {
1111
const fs = require('fs-extra')
1212
const path = require('path')
1313
const chalk = require('chalk')
@@ -24,7 +24,7 @@ npm run assets:build -- vue-quill
2424
const isRelease: boolean = args.release
2525
const buildAllMatching: string[] = args.all || args.a
2626

27-
run()
27+
await run()
2828

2929
async function run() {
3030
if (isRelease) {

scripts/preRelease.ts

Lines changed: 0 additions & 140 deletions
This file was deleted.

scripts/release.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
[
2020
'@semantic-release/exec',
2121
{
22-
prepareCmd: `npx ts-node ../../scripts/build.ts --nextVersion \$\{nextRelease.version\} && zip ${target}-dist.zip -r dist`,
22+
prepareCmd:
23+
'npx ts-node ../../scripts/build.ts --nextVersion \$\{nextRelease.version\} && ' +
24+
`zip ${target}-dist.zip -r dist`
2325
}
2426
],
2527
'@semantic-release/npm',
@@ -38,7 +40,7 @@
3840
]
3941
}
4042

41-
run()
43+
await run()
4244

4345
async function run() {
4446
const pkgDir = path.resolve(__dirname, `../packages/${target}`)

0 commit comments

Comments
 (0)