Skip to content

Commit e6284aa

Browse files
committed
chore: wip
1 parent b8b6e6f commit e6284aa

File tree

2 files changed

+33
-3
lines changed

2 files changed

+33
-3
lines changed

bunfig.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# preload these modules before running bun
2-
preload = [
3-
"./app/Server/Preload.ts",
4-
]
2+
preload = [ "./app/Server/Preload.ts" ]
53

64
[install]
75
# To configure Bun's package auto-install behavior.

storage/framework/core/build.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { path as p } from '@stacksjs/path'
2+
import { glob } from '@stacksjs/storage'
3+
import { dim, log, runCommand } from '@stacksjs/cli'
4+
5+
const dirs = await glob(p.resolve('./', '*'), { onlyDirectories: true })
6+
dirs.sort((a, b) => a.localeCompare(b))
7+
8+
const startTime = Date.now()
9+
10+
for (const dir of dirs) {
11+
if (dir.includes('bun-create'))
12+
continue
13+
14+
log.info(`Building ${dir}...`)
15+
16+
const startTime = Date.now()
17+
18+
// Run the build command in each directory
19+
await runCommand('bun run build', {
20+
cwd: dir,
21+
})
22+
23+
const endTime = Date.now()
24+
const timeTaken = endTime - startTime
25+
26+
log.success(`${dim(`[${timeTaken}ms]`)} Built ${dir}`)
27+
}
28+
29+
const endTime = Date.now()
30+
const timeTaken = endTime - startTime
31+
32+
log.success(`Build took ${timeTaken}ms`)

0 commit comments

Comments
 (0)