mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-10 12:57:47 +00:00
26 lines
460 B
JavaScript
26 lines
460 B
JavaScript
#!/usr/bin/env node
|
|
const fs = require('fs-extra');
|
|
const execa = require('execa');
|
|
const { join } = require('path');
|
|
|
|
async function main() {
|
|
const outDir = join(__dirname, 'dist');
|
|
|
|
// Start fresh
|
|
await fs.remove(outDir);
|
|
|
|
// Build with `ncc`
|
|
await execa(
|
|
'ncc',
|
|
['build', 'index.ts', '-e', '@vercel/build-utils', '-o', outDir],
|
|
{
|
|
stdio: 'inherit',
|
|
}
|
|
);
|
|
}
|
|
|
|
main().catch(err => {
|
|
console.error(err);
|
|
process.exit(1);
|
|
});
|