Package Exports
- script-box-mc
Readme
ScriptBoxMC
ScriptAPI addon template generated by scriptup.
Local library structure
- package/main.ts: local package source
- src/main.ts: sample usage that imports from ScriptBoxMC
Setup
npm installPublish
First publish (manual)
- Update
nameandversionin package.json (current import alias:ScriptBoxMC). - Build and publish:
npm run build
npm publish --access publicSubsequent publishes (automated via GitHub Actions)
[!TIP] Using npm Trusted Publishers removes the need to manage
NPM_TOKENin GitHub secrets.
On npmjs.com, open your package → Settings → Trusted Publishers.
Add a trusted publisher:
- GitHub Actions as the provider
- Organization or user: Enter your GitHub username or organization name
- Repository: Enter the repository name where the package is located
- Workflow filename:
publish.yml - Environment name: Keep empty
Once configured, delete the
NPM_TOKENsecret from GitHub repository settings (not needed anymore).Bump
versionin package.json, then create a GitHub release → .github/workflows/publish.yml runs automatically.