File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import { copyFileSync , existsSync , mkdirSync } from "node:fs"
1+ import { copyFileSync , existsSync , globSync , mkdirSync } from "node:fs"
22import path from "node:path"
33import esbuild from "esbuild"
44
@@ -37,25 +37,22 @@ function copyWasmFiles() {
3737
3838async function main ( ) {
3939 copyWasmFiles ( )
40+
41+ const entryPoints = [ "src/extension.ts" ]
42+ if ( ! production ) {
43+ entryPoints . push ( ...globSync ( "src/test/**/*.test.ts" ) )
44+ }
45+
4046 const ctx = await esbuild . context ( {
41- entryPoints : [
42- "src/extension.ts" ,
43- "src/test/extension.test.ts" ,
44- "src/test/EndpointTreeProvider.test.ts" ,
45- "src/test/extractors.test.ts" ,
46- "src/test/analyzer.test.ts" ,
47- "src/test/importResolver.test.ts" ,
48- "src/test/routerResolver.test.ts" ,
49- "src/test/transformer.test.ts" ,
50- "src/test/pathUtils.test.ts" ,
51- "src/test/parser.test.ts" ,
52- ] ,
47+ entryPoints,
5348 bundle : true ,
5449 format : "cjs" ,
5550 minify : production ,
5651 sourcemap : ! production ,
5752 sourcesContent : false ,
5853 platform : "node" ,
54+ target : "node20" ,
55+ treeShaking : true ,
5956 outdir : "dist" ,
6057 outbase : "src" ,
6158 external : [ "vscode" , "web-tree-sitter" ] ,
You can’t perform that action at this time.
0 commit comments