Monorepo for @rinsvent/rich-editor — React rich text editor/viewer on Lexical.
packages/rich-editor/ # library
apps/demo/ # Vite demo
docs/DESIGN.md # design doc
From the repo root (recommended — uses npm workspaces):
npm ci
npm run devOr install packages separately:
cd packages/rich-editor && npm install && npm run build
cd apps/demo && npm install && npm run devAfter enabling GitHub Pages (see below), the demo is published at:
https://rinsvent.github.io/rich-editor/
Build locally the same way CI does:
npm run build:pages
npx vite preview --base /rich-editor/ --outDir apps/demo/dist- Open repository Settings → Pages.
- Under Build and deployment → Source, choose GitHub Actions (not “Deploy from a branch”).
- Push to
master(or run the Deploy demo to GitHub Pages workflow manually).
The workflow .github/workflows/deploy-demo.yml builds packages/rich-editor, then apps/demo with base: /rich-editor/, and uploads apps/demo/dist.
Published as @rinsvent/rich-editor on npm.
npm install @rinsvent/rich-editor react react-domnpm ci
npm run publish:libYou need to be logged in (npm login) as rinsvent.
- Create an npm Granular Access Token at npmjs.com/settings/rinsvent/tokens:
- Packages and scopes: read/write for
@rinsvent/rich-editor(or all packages) - Enable Bypass 2FA if your account uses 2FA
- Packages and scopes: read/write for
- Add the token to the repo as secret
NPM_TOKEN: Settings → Secrets → Actions. - Bump
versioninpackages/rich-editor/package.json, commit, and push tomaster.
Workflow .github/workflows/publish.yml will test, build, publish to npm (if that version is not published yet), and create a GitHub Release automatically.
Other triggers (optional):
- Push tag
v0.1.1(must matchpackage.json) - Publish a GitHub Release manually
- Run Publish to npm from Actions
If CI fails with ENEEDAUTH, the NPM_TOKEN secret is missing or invalid — repeat step 1–2.
See docs/DESIGN.md for API and architecture.