Skip to content

Commit 64cf0f9

Browse files
committed
chore: options to generate --sourcemap
1 parent 29b51a7 commit 64cf0f9

File tree

4 files changed

+25
-19
lines changed

4 files changed

+25
-19
lines changed

scripts/bootstrap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// create package.json, README, etc. for packages that don't have them yet
2-
(() => {
2+
;(() => {
33
const fs = require('fs')
44
const path = require('path')
55

scripts/dev.ts

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

2222
const args = require('minimist')(process.argv.slice(2))
2323
console.log(args)
24-
const target: string = args._.length ? fuzzyMatchTarget(args._)[0] : 'vue-quill'
24+
const target: string = args._.length
25+
? fuzzyMatchTarget(args._)[0]
26+
: 'vue-quill'
2527
const formats: string[] = args.formats || args.f
2628
const sourceMap: boolean = args.sourcemap || args.s
2729
const commit = execa.sync('git', ['rev-parse', 'HEAD']).stdout.slice(0, 7)

scripts/devAssets.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@ To specify the package to build, simply pass its name
77
npm run assets:build -- vue-quill
88
```
99
*/
10-
(async () => {
10+
;(async () => {
1111
const fs = require('fs-extra')
1212
const path = require('path')
1313
const chalk = require('chalk')
1414
const execa = require('execa')
1515
const {
1616
targetAssets: allTargets,
1717
fuzzyMatchTarget,
18-
runParallel
18+
runParallel,
1919
} = require('./utils')
2020

2121
const args = require('minimist')(process.argv.slice(2))
2222
const targets: string[] = args._
23-
// const sourceMap = args.sourcemap || args.s
23+
const sourceMap = args.sourcemap || args.s
2424
const isRelease: boolean = args.release
2525
const buildAllMatching: string[] = args.all || args.a
2626

@@ -55,7 +55,13 @@ npm run assets:build -- vue-quill
5555
const inputExt = path.extname(input)
5656

5757
if (inputExt === '.styl' || inputExt === '.css') {
58-
execa('stylus', ['-w', input, '-o', output])
58+
execa('stylus', [
59+
'-w',
60+
input,
61+
'-o',
62+
output,
63+
sourceMap ? '--sourcemap' : '',
64+
])
5965
} else {
6066
console.log(chalk.redBright(`File extention not supported: ${input}`))
6167
}

scripts/verifyCommit.ts

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
// Invoked on the commit-msg git hook by yorkie.
2-
(() => {
2+
;(() => {
33
const chalk = require('chalk')
44
const msgPath = process.env.GIT_PARAMS
5-
const msg: string = require('fs')
6-
.readFileSync(msgPath, 'utf-8')
7-
.trim();
5+
const msg: string = require('fs').readFileSync(msgPath, 'utf-8').trim()
86

97
const commitRE = /^(revert: )?(feat|fix|docs|dx|style|refactor|perf|test|workflow|build|ci|chore|types|wip|release)(\(.+\))?: .{1,50}/
108

@@ -14,14 +12,14 @@
1412
` ${chalk.bgRed.white(' ERROR ')} ${chalk.red(
1513
`invalid commit message format.`
1614
)}\n\n` +
17-
chalk.red(
18-
` Proper commit message format is required for automated changelog generation. Examples:\n\n`
19-
) +
20-
` ${chalk.green(`feat(vue-quill): add 'comments' option`)}\n` +
21-
` ${chalk.green(
22-
`fix(props): handle events on blur (close #28)`
23-
)}\n\n` +
24-
chalk.red(` See .github/commit-convention.md for more details.\n`)
15+
chalk.red(
16+
` Proper commit message format is required for automated changelog generation. Examples:\n\n`
17+
) +
18+
` ${chalk.green(`feat(vue-quill): add 'comments' option`)}\n` +
19+
` ${chalk.green(
20+
`fix(props): handle events on blur (close #28)`
21+
)}\n\n` +
22+
chalk.red(` See .github/commit-convention.md for more details.\n`)
2523
)
2624
process.exit(1)
2725
}

0 commit comments

Comments
 (0)