0.4.0 • Published 10 days ago

@relationalai/codemirror-lang-rel v0.4.0

Weekly downloads
-
License
MIT
Repository
-
Last release
10 days ago

CodeMirror 6 Rel language package

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 required function and LanguageSupport
  • 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 required LanguageSupport

To build/compile the new dist entries run:

npm run prepare

To test:

npm run test

Development

For local development and testing you can:

  • Install fswatch, then run the following script to auto "prepare", watch and copy to the console code editor folder the rel.ts file:
fswatch -or src | xargs -I{} sh -c "npm run prepare && cp dist/index.js <ENTER PATH HERE>/rel.ts"

e.g.

fswatch -or src | xargs -I{} sh -c "npm run prepare && cp dist/index.js ../../Dev/rai-ux/packages/code-editor/src/rel.ts"
  • Once the fswatch has generated the output file (rel.ts) import it into consore/code editor via changing the CodeEditor.tsx file rel import. E.g:
import { rel } from './rel'; //'@relationalai/codemirror-lang-rel';
  • If all done correctly on any change to the parser files the code editor would refresh and reflect the changes

Note: Make sure you bump the package.json version on every release ready for consumption by CM6.

0.4.0

10 days ago

0.3.3

2 months ago

0.3.2

5 months ago

0.2.15

8 months ago

0.2.14

8 months ago

0.2.13

8 months ago

0.2.12

10 months ago

0.3.0

6 months ago

0.3.1

6 months ago

0.2.11

11 months ago

0.2.10

1 year ago

0.2.9

1 year ago

0.2.8

1 year ago

0.1.21

2 years ago

0.1.21-alpha.0

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.2.6

1 year ago

0.2.2

2 years ago

0.2.4

1 year ago

0.1.20

2 years ago

0.1.12

2 years ago

0.1.13

2 years ago

0.1.14

2 years ago

0.1.15

2 years ago

0.1.2

2 years ago

0.1.16

2 years ago

0.1.17

2 years ago

0.1.14-beta.1

2 years ago

0.1.18

2 years ago

0.1.14-beta.0

2 years ago

0.1.19

2 years ago

0.1.10

2 years ago

0.1.11

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.9

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago