A toolset for personal projects
Create a .npmrc file in your code root dir
@shin:registry=https://npm.pkg.github.com
Add Github PAT to .npmrc file
//npm.pkg.github.com/:_authToken=GITHUB_TOKEN
npm i -D @shin/tools@latest
Add 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-st
Create 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