Motivation
Downstream projects like volview-girder-client currently clone and build VolView manually via custom scripts. Publishing VolView to NPM allows them to simply npm install volview and reference node_modules/volview/dist/.
Implementation
1. Add to package.json
2. Create GitHub Actions workflow
- Trigger on merge to
main
- Auto-increment patch version
- Build with:
VITE_REMOTE_SERVER_URL= VITE_ENABLE_REMOTE_SAVE=true npm run build
- Publish to NPM
- Commit version bump back to repo with
[skip ci]
3. Configure secrets
- Add
NPM_TOKEN to GitHub repository secrets
- Enable "Read and write permissions" for GitHub Actions
Result
- Package size: ~63MB (dist + source)
- Auto-publish on every merge to main
- Version auto-increments: 4.4.0 → 4.4.1 → 4.4.2...
Motivation
Downstream projects like
volview-girder-clientcurrently clone and build VolView manually via custom scripts. Publishing VolView to NPM allows them to simplynpm install volviewand referencenode_modules/volview/dist/.Implementation
1. Add to
package.json2. Create GitHub Actions workflow
mainVITE_REMOTE_SERVER_URL= VITE_ENABLE_REMOTE_SAVE=true npm run build[skip ci]3. Configure secrets
NPM_TOKENto GitHub repository secretsResult