Skip to content

Commit 773288f

Browse files
committed
chore: use templating
1 parent ead441d commit 773288f

File tree

3 files changed

+1107
-6
lines changed

3 files changed

+1107
-6
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Julia grammar definition for Atom, VS Code, and GitHub.
66

7-
The source of truth in this repo is `grammars/julia.json`; `julia.cson` and `julia_vscode.json` are automatically generated in a pre-commit hook.
7+
The source of truth in this repo is `grammars/julia.template.json`; `julia.json`, `julia.cson`, and `julia_vscode.json` are automatically generated in a pre-commit hook or with `npm run generate`.
88

99
## Contributing
1010

@@ -13,10 +13,10 @@ We love contributors. Here are the steps we have taken to develop on this packag
1313
0. Install prerequisites: [Node.js](https://nodejs.org/) and `npm` (comes bundled with Node). We recommend using a [Node version manager](https://github.com/search?q=node+version+manager+archived%3Afalse&type=repositories&ref=advsearch). LTS is recommended, but any node version newer than 14 should do.
1414
1. Clone this repo and `cd` into it
1515
2. Run `npm ci`
16-
3. Open `grammars/julia.json` in your favourite editor and fix a bug or implement additional highlighting rules
16+
3. Open `grammars/julia.template.json` in your favourite editor and fix a bug or implement additional highlighting rules
1717
4. Add corresponding tests at the bottom of `test/test.js`
1818
5. Run the updated tests with `npm run test`
19-
6. Once tests pass and you're happy with your changes, commit them and open a PR against this repo. This should automatically run a pre-commit hook that generates derivative grammars for VS Code and Atom from `julia.json`.
19+
6. Once tests pass and you're happy with your changes, commit them and open a PR against this repo. This should automatically run a pre-commit hook that generates derivative grammars for VS Code and Atom from `julia.template.json`.
2020

2121
### Testing the updated grammar in VS Code
2222
Follow the [julia-vscode developer instructions](https://github.com/julia-vscode/julia-vscode/blob/main/CONTRIBUTING.md) to get the extension setup. Afterwards, simply copy the updated `julia_vscode.json` from this repo into `julia-vscode/syntaxes` and you should see your changes in the debug editor after reloading it.

0 commit comments

Comments
 (0)