build and release process
Build with esbuild, eyeball dist/, publish npm yourself, let JSDoc deploy from main.
Related: Build system, Package configuration, Automated documentation deployment.
Build#
npm run build
prepare also builds on install and before publish.
flowchart TB idx[src/index.js] --> esb[esbuild] esb --> min[dist/jsjiit.min.esm.js] esb --> esm[dist/jsjiit.esm.js] esb --> maps[*.map]
commonConfig: bundle: true, format: "esm", target: ["es2020"], sourcemap: true.
Pre-publish checks#
rm -rf dist/
npm run build
ls -lh dist/
Success lines from build.mjs:
✅ Production build complete
✅ Development build complete
🎉 All builds completed successfully!
flowchart LR clean[rm dist] --> build[npm run build] build --> files[four artifacts]
Open dist/jsjiit.esm.js and confirm it still exports WebPortal and does not contain a useProxy you did not write.
Version#
This clone is 0.0.22. Bump package.json (and the lockfile name field) before a new publish. README CDN URLs are already stale (0.0.20). Update them in the same commit.
flowchart TD bump[edit version] --> tag[optional git tag] bump --> npm[npm publish]
There is no release workflow.
npm publish#
npm publish
prepare rebuilds. files includes dist and src. After publish, jsDelivr will serve:
https://cdn.jsdelivr.net/npm/[email protected]/dist/jsjiit.min.esm.js
flowchart LR tarball[npm tarball] --> registry[registry.npmjs.org] registry --> jsdelivr[cdn.jsdelivr.net/npm/jsjiit]
You need an npm account with publish rights on jsjiit. The package author field is codeblech. This fork may not be able to publish that name.
Docs on push#
flowchart LR main[push main] --> gha[jsdoc-build.yaml] gha --> pages[gh-pages]
Not tied to npm. A docs-only commit still deploys JSDoc.
After a release#
flowchart TB pub[published version] --> check[npm show jsjiit version] check --> cdn[hit jsDelivr URL] cdn --> apps[JPortal and others pin a version]
Apps that pin @0.0.27 are not running this source. Do not document their extras until they exist in wrapper.js.