File tree 2 files changed +24
-0
lines changed
2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import { name, version } from '~build/package';
18
18
import { isCI , name as ciName } from '~build/ci' ;
19
19
20
20
import { format } from 'date-fns' ;
21
+ import './playground' ;
21
22
22
23
const buildTime = document . querySelector < HTMLElement > ( '.container' ) ! ;
23
24
Original file line number Diff line number Diff line change
1
+ import * as ci from '~build/ci' ;
2
+ import * as git from '~build/git' ;
3
+ import * as info from '~build/info' ;
4
+ import * as meta from '~build/meta' ;
5
+ import * as packageInfo from '~build/package' ;
6
+ import time from '~build/time' ;
7
+
8
+ // poor man's unwrap
9
+ const unwrapModule = < T > ( obj : T ) : T => JSON . parse ( JSON . stringify ( obj ) ) ;
10
+
11
+ const buildInfo = {
12
+ info : unwrapModule ( info ) ,
13
+ git : unwrapModule ( git ) ,
14
+ ci : unwrapModule ( ci ) ,
15
+ meta : unwrapModule ( meta ) ,
16
+ package : unwrapModule ( packageInfo ) ,
17
+ time
18
+ } ;
19
+
20
+ ( globalThis as any ) . buildInfo = buildInfo ;
21
+
22
+ console . log ( 'You can access build info from `buildInfo` variable.' ) ;
23
+ console . log ( buildInfo ) ;
You can’t perform that action at this time.
0 commit comments