Skip to content

Commit

Permalink
perf(custom): 简化 scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidKk committed Nov 28, 2023
1 parent b2fccc2 commit 9b38247
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions scripts/postinstall
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,14 @@
;(async function main () {
const fs = require('fs')
const { exec } = require('child_process')
const tasks = []
const tasks = ['tsc --build ./tsconfig.build.json']

if (fs.existsSync('tsconfig.build.json')) {
tasks.push('tsc --build ./tsconfig.build.json')
} else {
tasks.push(...[
if (!fs.existsSync('tsconfig.build.json')) {
tasks.unshift(...[
'ts-patch install -s',
'lerna run compile --parallel --include-dependencies --scope=@dumlj/tidy-cli --scope=@dumlj/create-cli',
'dumlj install husky',
'dumlj concurrently \"tscfg --exclude \"**/__template__\" --exclude \"**/__example__\"\" \"deps --exclude \"**/__template__\"\"',
'tsc --build ./tsconfig.build.json',
])
}

Expand Down

0 comments on commit 9b38247

Please sign in to comment.