mirror of
https://github.com/LukeHagar/skeleton.git
synced 2025-12-10 04:21:26 +00:00
Build scripts and updated
This commit is contained in:
18
scripts/post-build.js
Normal file
18
scripts/post-build.js
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/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);
|
||||
|
||||
Reference in New Issue
Block a user