forked from yasinkuyu/StackerFTP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathesbuild.js
More file actions
30 lines (27 loc) · 760 Bytes
/
Copy pathesbuild.js
File metadata and controls
30 lines (27 loc) · 760 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
const esbuild = require('esbuild');
async function main() {
const ctx = await esbuild.context({
entryPoints: ['src/extension.ts'],
bundle: true,
format: 'cjs',
minify: false,
sourcemap: !process.argv.includes('--minify'),
sourcesContent: false,
platform: 'node',
target: 'node16.14', // Match VS Code's Node version range
outfile: 'dist/extension.js',
external: ['vscode', 'ssh2'],
logLevel: 'info',
mainFields: ['module', 'main'],
});
if (process.argv.includes('--watch')) {
await ctx.watch();
} else {
await ctx.rebuild();
await ctx.dispose();
}
}
main().catch(e => {
console.error(e);
process.exit(1);
});