mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-04-22 05:39:32 +08:00
25 lines
567 B
JavaScript
25 lines
567 B
JavaScript
#!/usr/bin/env node
|
|
const { build } = require('esbuild');
|
|
|
|
!(async () => {
|
|
const artifacts = [{ src: 'src/main.js', dest: 'sub-store.min.js' }];
|
|
|
|
for await (const artifact of artifacts) {
|
|
await build({
|
|
entryPoints: [artifact.src],
|
|
bundle: true,
|
|
minify: false,
|
|
sourcemap: false,
|
|
platform: 'node',
|
|
format: 'cjs',
|
|
outfile: artifact.dest,
|
|
});
|
|
}
|
|
})()
|
|
.catch((e) => {
|
|
console.log(e);
|
|
})
|
|
.finally(() => {
|
|
console.log('done');
|
|
});
|