@@ -19,9 +19,7 @@ import { name, version } from '~build/package';
19
19
20
20
import { format } from 'date-fns' ;
21
21
22
- console . log ( 'Build time:' , now ) ;
23
-
24
- const buildTime = document . querySelector ( '.container' ) as HTMLElement ;
22
+ const buildTime = document . querySelector < HTMLElement > ( '.container' ) ! ;
25
23
26
24
function append ( key : string , value : string | number | null ) {
27
25
const p = document . createElement ( 'div' ) ;
@@ -35,6 +33,11 @@ function append(key: string, value: string | number | null) {
35
33
buildTime . appendChild ( p ) ;
36
34
}
37
35
36
+ const h1 = document . createElement ( 'h1' ) ;
37
+ // use caution with `innerHTML`
38
+ h1 . innerHTML = `<a href="${ github } " target="_blank">unplugin-info<a>` ;
39
+ buildTime . appendChild ( h1 ) ;
40
+
38
41
append ( 'Build time: ' , format ( now , 'yyyy-MM-dd hh:mm' ) ) ;
39
42
append ( 'CI: ' , CI ? CI : 'Not a CI env' ) ;
40
43
append ( 'Github: ' , github ? github : 'Not a github' ) ;
@@ -54,3 +57,6 @@ append('Message: ', message);
54
57
55
58
append ( 'Package name: ' , name ) ;
56
59
append ( 'Package version: ' , version ) ;
60
+ append ( '' , '' ) ;
61
+
62
+ append ( 'You can also open console and play around with it.' , '' ) ;
0 commit comments