File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -9,17 +9,14 @@ const BUILD_OPTIONS: ESBuild.BuildOptions = {
9
9
minify : true ,
10
10
define : { LIVE_RELOAD : "false" } ,
11
11
} ;
12
- async function main ( ) : Promise < void > {
12
+ if ( import . meta . main ) {
13
13
const start = performance . now ( ) ;
14
- if ( ! await Dictionary . build ( ) ) {
14
+ if ( await Dictionary . build ( ) ) {
15
+ await ESBuild . build ( BUILD_OPTIONS ) ;
16
+ const end = performance . now ( ) ;
17
+ // deno-lint-ignore no-console
18
+ console . log ( `Total time took: ${ Math . floor ( end - start ) } ms` ) ;
19
+ } else {
15
20
Deno . exitCode = 1 ;
16
- return ;
17
21
}
18
- await ESBuild . build ( BUILD_OPTIONS ) ;
19
- const end = performance . now ( ) ;
20
- // deno-lint-ignore no-console
21
- console . log ( `Total time took: ${ Math . floor ( end - start ) } ms` ) ;
22
- }
23
- if ( import . meta. main ) {
24
- await main ( ) ;
25
22
}
You can’t perform that action at this time.
0 commit comments