2024-10-19 17:47:59 +08:00
|
|
|
import { build } from 'esbuild';
|
|
|
|
import { promises as fs } from 'fs';
|
|
|
|
|
|
|
|
await build({
|
|
|
|
entryPoints: ['src/main.ts'],
|
|
|
|
bundle: true,
|
2024-11-09 12:16:26 +08:00
|
|
|
external:[
|
|
|
|
'hexo-util',
|
|
|
|
'hexo'
|
|
|
|
],
|
2024-10-19 17:47:59 +08:00
|
|
|
outdir: 'dist',
|
|
|
|
platform: 'node',
|
|
|
|
sourcemap: false,
|
|
|
|
tsconfig: 'tsconfig.json',
|
|
|
|
});
|
|
|
|
await fs.copyFile('src/index.js', 'dist/index.js');
|