reformatted to use my template
This commit is contained in:
24
build.mjs
Normal file
24
build.mjs
Normal file
@@ -0,0 +1,24 @@
|
||||
import { build } from 'esbuild';
|
||||
import commandLineArgs from 'command-line-args';
|
||||
|
||||
const args = commandLineArgs([
|
||||
{ name: 'watch', alias: 'w', type: Boolean },
|
||||
{ name: 'bundle', alias: 'b', type: Boolean },
|
||||
{ name: 'minify', alias: 'm', type: Boolean },
|
||||
{ name: 'sourcemap', alias: 's', type: Boolean }
|
||||
]);
|
||||
|
||||
//build TS
|
||||
build({
|
||||
entryPoints: ['src/main.ts'],
|
||||
outdir: 'dist',
|
||||
|
||||
target: 'es2020',
|
||||
platform: 'node',
|
||||
format: 'cjs',
|
||||
|
||||
watch: args.watch,
|
||||
bundle: args.bundle,
|
||||
minify: args.minify,
|
||||
sourcemap: args.sourcemap
|
||||
});
|
||||
Reference in New Issue
Block a user