mirror of
https://github.com/LukeHagar/skeleton.git
synced 2025-12-06 12:47:44 +00:00
15 lines
642 B
JavaScript
15 lines
642 B
JavaScript
#!/usr/bin/env node
|
|
import { del } from 'edit-package-json';
|
|
import { readFileSync, rmSync, writeFileSync } from 'fs';
|
|
|
|
//We chop out the exports field of ../package.json rather than manipulate the one in ../package/package.json in case there
|
|
//are changes to the behaviour of 'vite build'. post-build.js will patch it back in so that monorepos work again.
|
|
writeFileSync('package.json', del(readFileSync('package.json').toString(), 'exports'));
|
|
|
|
try {
|
|
// We'll delete the .temp directory to force the regeneration of all of the TW Classes
|
|
rmSync('.temp', { recursive: true });
|
|
} catch {
|
|
// Directory doesn't exist, don't worry about it
|
|
}
|