File tree Expand file tree Collapse file tree 2 files changed +33
-3
lines changed Expand file tree Collapse file tree 2 files changed +33
-3
lines changed Original file line number Diff line number Diff line change 1
1
# preload these modules before running bun
2
- preload = [
3
- " ./app/Server/Preload.ts" ,
4
- ]
2
+ preload = [ " ./app/Server/Preload.ts" ]
5
3
6
4
[install ]
7
5
# To configure Bun's package auto-install behavior.
Original file line number Diff line number Diff line change
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` )
You can’t perform that action at this time.
0 commit comments