()
| 31 | } |
| 32 | |
| 33 | async function main() { |
| 34 | copyResources(); |
| 35 | |
| 36 | const ctx = await esbuild.context({ |
| 37 | entryPoints: ['./src/extension.ts'], |
| 38 | bundle: true, |
| 39 | format: 'cjs', |
| 40 | minify: production, |
| 41 | sourcemap: !production, |
| 42 | sourcesContent: false, |
| 43 | platform: 'node', |
| 44 | outfile: 'dist/extension.js', |
| 45 | external: ['vscode', 'utf-8-validate', 'bufferutil'], |
| 46 | logLevel: 'info', |
| 47 | }); |
| 48 | |
| 49 | if (watch) { |
| 50 | await ctx.watch(); |
| 51 | console.log('Watching for changes...'); |
| 52 | } else { |
| 53 | await ctx.rebuild(); |
| 54 | await ctx.dispose(); |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | main().catch(e => { |
| 59 | console.error(e); |
no test coverage detected