Skip to content

Commit 97a9c09

Browse files
committed
Update editor build script to preserve tsc watch output and refine logs
- seems like watch command clears terminal output, should not - don't show 'building...'. change 'finished in..' to 'built in...' └── apps └── editor ├── package.json ├── scripts │ └── build.mjs └── vite.config.ts
1 parent fddd8dd commit 97a9c09

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎apps/editor/scripts/build.mjs‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
const start_time = Date.now()
2-
console.log('Building...')
32

43
import * as fs from 'node:fs'
54
import * as path from 'node:path'
@@ -37,7 +36,7 @@ const run = async () => {
3736
clean()
3837

3938
if (is_watch) {
40-
const tsc = spawn('tsc', ['--noEmit', '--watch'], {
39+
const tsc = spawn('tsc', ['--noEmit', '--watch', '--preserveWatchOutput'], {
4140
cwd: app_dir,
4241
stdio: 'inherit',
4342
shell: process.platform == 'win32'
@@ -52,7 +51,7 @@ const run = async () => {
5251
const finish = (target) => {
5352
if (pending.delete(target) && pending.size == 0) {
5453
const time = ((Date.now() - start_time) / 1000).toFixed(1)
55-
console.log(`Finished in ${time}s.`)
54+
console.log(`Built in ${time}s.`)
5655
}
5756
}
5857

0 commit comments

Comments
 (0)