mirror of
https://github.com/LukeHagar/skeleton.git
synced 2025-12-06 12:47:44 +00:00
19 lines
523 B
JavaScript
19 lines
523 B
JavaScript
#!/usr/bin/env node
|
|
import { readFileSync, writeFileSync } from 'fs'
|
|
|
|
//Put the exports field back into package.json so that monorepos can work again
|
|
let packageJson = readFileSync('package.json').toString()
|
|
packageJson = packageJson.slice(0, packageJson.lastIndexOf('}')-1) //strip closing }
|
|
packageJson +=
|
|
`,
|
|
"exports": {
|
|
".": "./src/lib/index.ts",
|
|
"./themes/*": "./src/lib/themes/*",
|
|
"./styles/*": "./src/lib/styles/*",
|
|
"./tailwind/*": "./src/lib/tailwind/*"
|
|
}
|
|
}`
|
|
|
|
writeFileSync('package.json', packageJson);
|
|
|