hexo-highlighter-shiki/build.mjs

12 lines
287 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,
outdir: 'dist',
platform: 'node',
sourcemap: false,
tsconfig: 'tsconfig.json',
});
await fs.copyFile('src/index.js', 'dist/index.js');