Skip to content

Commit

Permalink
feat: 📃auto upload docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nailiable committed Oct 26, 2024
1 parent 74865d4 commit 115532f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"scripts": {
"build": "tsx scripts/build-all.ts",
"build:ioc": "pnpm -F @nailyjs/ioc build",
"build:backend": "pnpm -F @nailyjs/backend build",
"build:rpc": "pnpm -F @nailyjs/rpc build",
"build:unplugin-rpc": "pnpm -F unplugin-rpc build",
"build:backend": "pnpm -F @nailyjs/backend build",
"play:rpc": "pnpm -F rpc-playground dev",
"play:build": "pnpm -F rpc-playground build",
"lint": "eslint .",
Expand Down
9 changes: 4 additions & 5 deletions scripts/build-all.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { exec } from 'node:child_process'
import { stderr, stdout } from 'node:process'
import { execSync } from 'node:child_process'
import { scripts } from '../package.json'

for (const [name, _script] of Object.entries(scripts)) {
if (!name.startsWith('build:')) continue

const child_process = exec(`pnpm run ${name}`)
child_process.stdout?.pipe(stdout)
child_process.stderr?.pipe(stderr)
execSync(`pnpm run ${name}`, {
stdio: 'inherit',
})
}

0 comments on commit 115532f

Please sign in to comment.