1
- import { compile , CompileOptions } from 'https://deno.land/x/[email protected] /tsc/compile.ts' ;
2
- import { colors , path , Sha1 , walk } from '../deps.ts' ;
3
- import { initWasm , transpileSync } from './mod.ts' ;
1
+ import { compile , CompileOptions } from 'https://deno.land/x/[email protected] /tsc/compile.ts'
2
+ import { colors , path , Sha1 , walk } from '../deps.ts'
3
+ import { initWasm , transpileSync } from './mod.ts'
4
4
5
5
const hashShort = 9
6
6
const reHttp = / ^ h t t p s ? : \/ \/ / i
@@ -39,6 +39,8 @@ async function benchmark(sourceFiles: Array<{ code: string, filename: string }>,
39
39
console . log ( `[benchmark] ${ sourceFiles . length } files ${ isDev ? '(development mode)' : '' } ` )
40
40
41
41
const d1 = { d : 0 , min : 0 , max : 0 , }
42
+ const d2 = { d : 0 , min : 0 , max : 0 , }
43
+
42
44
for ( const { code, filename } of sourceFiles ) {
43
45
const t = performance . now ( )
44
46
for ( let i = 0 ; i < 5 ; i ++ ) {
@@ -53,8 +55,6 @@ async function benchmark(sourceFiles: Array<{ code: string, filename: string }>,
53
55
}
54
56
d1 . d += d
55
57
}
56
-
57
- const d2 = { d : 0 , min : 0 , max : 0 , }
58
58
for ( const { code, filename } of sourceFiles ) {
59
59
const t = performance . now ( )
60
60
for ( let i = 0 ; i < 5 ; i ++ ) {
@@ -83,6 +83,7 @@ if (import.meta.main) {
83
83
stderr : 'null'
84
84
} )
85
85
await initWasm ( ( new TextDecoder ) . decode ( await p . output ( ) ) . split ( '"' ) [ 1 ] )
86
+ p . close ( )
86
87
87
88
const sourceFiles : Array < { code : string , filename : string } > = [ ]
88
89
const walkOptions = { includeDirs : false , exts : [ '.tsx' ] , skip : [ / [ \. _ ] t e s t \. t s x ? $ / i] }
0 commit comments