@mavnn/codemirror-lang-ink 0.9.0 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/ci.yml +20 -0
- package/.github/workflows/publish.yml +26 -0
- package/README.md +10 -1
- package/dist/index.js +114 -18014
- package/package.json +2 -2
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name: Build and test
|
|
2
|
+
on:
|
|
3
|
+
pull_request:
|
|
4
|
+
types: [opened, reopened, review_requested]
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
jobs:
|
|
8
|
+
build:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
id-token: write
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v5
|
|
15
|
+
- uses: actions/setup-node@v4
|
|
16
|
+
with:
|
|
17
|
+
node-version: '20.x'
|
|
18
|
+
- run: npm install
|
|
19
|
+
- run: npm run build
|
|
20
|
+
- run: npm run test
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: Publish Package to npmjs
|
|
2
|
+
on:
|
|
3
|
+
release:
|
|
4
|
+
types: [published]
|
|
5
|
+
|
|
6
|
+
permissions:
|
|
7
|
+
id-token: write # Required for OIDC
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
publish:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v5
|
|
15
|
+
|
|
16
|
+
- uses: actions/setup-node@v4
|
|
17
|
+
with:
|
|
18
|
+
node-version: '20.x'
|
|
19
|
+
registry-url: 'https://registry.npmjs.org'
|
|
20
|
+
|
|
21
|
+
# Ensure npm 11.5.1 or later is installed
|
|
22
|
+
- name: Update npm
|
|
23
|
+
run: npm install -g npm@latest
|
|
24
|
+
- run: npm install
|
|
25
|
+
- run: npm run build
|
|
26
|
+
- run: npm publish
|
package/README.md
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
# Ink language support for CodeMirror
|
|
2
2
|
|
|
3
|
+
- [npm package](https://www.npmjs.com/package/@mavnn/codemirror-lang-ink)
|
|
3
4
|
- [CodeMirror](https://codemirror.net/)
|
|
4
5
|
- [Ink](https://www.inklestudios.com/ink/)
|
|
5
6
|
|
|
6
7
|
This package implements Ink language support for the
|
|
7
8
|
[CodeMirror](https://codemirror.net/) code editor.
|
|
8
9
|
|
|
10
|
+
You can try out the editor live in a demo Ink project at [VisualInk](https://visualink.mavnn.eu/script/demo).
|
|
11
|
+
|
|
9
12
|
This code is released under an
|
|
10
13
|
[MIT license](https://github.com/mavnn/codemirror-lang-ink/tree/main/LICENSE).
|
|
11
14
|
|
|
@@ -13,7 +16,7 @@ This code is released under an
|
|
|
13
16
|
|
|
14
17
|
```javascript
|
|
15
18
|
import {EditorView, basicSetup} from "codemirror"
|
|
16
|
-
import {InkLanguageSupport} from "@codemirror
|
|
19
|
+
import {InkLanguageSupport} from "@mavnn/codemirror-lang-ink"
|
|
17
20
|
|
|
18
21
|
const view = new EditorView({
|
|
19
22
|
parent: document.body,
|
|
@@ -22,3 +25,9 @@ const view = new EditorView({
|
|
|
22
25
|
})
|
|
23
26
|
```
|
|
24
27
|
|
|
28
|
+
## Tests
|
|
29
|
+
|
|
30
|
+
If you find an issue with the grammar (incorrect highlighting boundaries, etc) please include
|
|
31
|
+
the snippet of Ink code that causes the issue in your bug report. As you can see in the
|
|
32
|
+
tests directory, the test suite allows us to directly compare Ink files with the syntax tree
|
|
33
|
+
we expect them to produce.
|