A toolset for personal projects
Create a .npmrc file in your code root dir
@shin:registry=https://npm.pkg.github.amrom.workers.devAdd Github PAT to .npmrc file
//npm.pkg.github.com/:_authToken=GITHUB_TOKENnpm i -D @shin/tools@latestAdd the script to package.json
"scripts": {
"install-st": "git clone https://github.com/shin/tools.git && npm run build --prefix tools && npm i -D ./tools"
}npm run install-stCreate a st.config.json file in your code root dir
{
"monorepo": {
"electron": {
"dir": "packages/electron"
},
"next": {
"dir": "packages/next",
"useExports": true
}
}
}Add the script to package.json
"scripts": {
"st": "tools build"
}
Add the exports to package.json(packages/next) like below
"exports": {
"./standalone/server": "./.next/standalone/packages/next/server.js"
}- monorepo/
- packages/
- electron/
- next/
- packages/
In monorepo,
- Comment out the line in the standalone server.js because it causes a problem when used in the Electron app.
process.chdir(__dirname)- Electron Forge does not use the local Next.js package correctly, so to run the Next.js standalone server, you need to prepare Next.js resources for Electron to build the bundler.
- @types/node
- esbuild
- glob
- typescript
MIT
- 0.0.1
- Initial Release
- Maintainer: Shin
- Project Link: https://github.com/shin/tools