14 lines
395 B
JavaScript
14 lines
395 B
JavaScript
|
import esbuild from 'esbuild';
|
||
|
import fsp from 'node:fs/promises';
|
||
|
|
||
|
fsp.rm('dist', { recursive: true, force: true });
|
||
|
fsp.mkdir('dist', { recursive: true });
|
||
|
const src = await fsp.readdir('src', { recursive: true });
|
||
|
const filtered = src.filter(x => x.endsWith('.ts')).map(x => 'src/' + x);
|
||
|
|
||
|
await esbuild.build({
|
||
|
entryPoints: filtered,
|
||
|
outdir: 'dist',
|
||
|
tsconfig: 'tsconfig.json'
|
||
|
});
|