hexo-highlighter-shiki/build.mjs

16 lines
345 B
JavaScript
Raw Permalink Normal View History

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,
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');