Develop¶
npm install
npm test
npm run buildThe tests run CodeMirror in jsdom against a fake language server, and take about a second.
npm run build also typechecks.
npm install runs it too, through the prepare script.
CI runs npm ci and the tests on every pull request.
To try a change in another project, install your checkout as a copy:
npm install ../codemirror-lsp-inlay-hints --install-linksA plain file: link would give that project two copies of @codemirror/state.
CodeMirror breaks when extensions come from different copies.
npm only re-copies when the version changes.
To pick up later changes, delete the copy in that project’s node_modules and install again.
Docs¶
The docs site is this repository’s README plus this page.
npm run docs:live previews it, and npm run docs builds it.
It’s published to GitHub Pages from main.
Release¶
Bump
versioninpackage.jsonand merge it tomain.Run the Release workflow from the Actions tab, or
gh workflow run release.yml.
It runs the tests, publishes the package to npm, tags the commit v<version>, and creates a GitHub release with generated notes.
Publishing needs npm’s trusted publisher set up for release.yml.