This is the official Rel language support package for the CodeMirror editor.
It is based on CM6 language support example and contains:
- The Rel grammar in Lezer format
- The CM6 language pack integration
index.ts
which exports the requiredfunction
andLanguageSupport
- Tests are in
/test/cases.txt
and are wired/ran via mocha - CM6 consumes the
dist/index.js
file which contains a "compilation" of the parser and the requiredLanguageSupport
To build/compile the new dist
entries run:
npm run prepare
To test:
npm run test
For local development and testing you can:
- Compile the
dist
via running theprepare
script mentioned above - Copy the contents of the
/dist/index.js
into arel.js
file for example - Import
rel.js
file into CM6 via changing theraiSetup.ts
extensions array in the Rai Console Repo.
Note: Make sure you bump the package.json
version on every release ready for consumption by CM6.