@arborium/groovy 2.4.0
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/README.md +65 -0
- package/package.json +43 -0
package/README.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# @arborium/groovy
|
|
2
|
+
|
|
3
|
+
[](https://github.com/bearcove/arborium)
|
|
4
|
+
[](https://www.npmjs.com/package/@arborium/groovy)
|
|
5
|
+
[](https://github.com/bearcove/arborium)
|
|
6
|
+
|
|
7
|
+
Syntax highlighting for [Groovy](https://en.wikipedia.org/wiki/Apache_Groovy), powered by WebAssembly and [tree-sitter](https://tree-sitter.github.io/).
|
|
8
|
+
|
|
9
|
+
> Apache Groovy is a dynamic language for the JVM with syntax inspired by Java, featuring optional typing, closures, and powerful DSL capabilities that make it ideal for scripting and build tools like Gradle.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
| | |
|
|
13
|
+
|---|---|
|
|
14
|
+
| **Inventor** | James Strachan |
|
|
15
|
+
| **Year** | 2003 |
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install @arborium/groovy
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
```javascript
|
|
26
|
+
import { createHighlighter } from '@arborium/arborium';
|
|
27
|
+
import * as grammar from '@arborium/groovy';
|
|
28
|
+
|
|
29
|
+
const highlighter = await createHighlighter();
|
|
30
|
+
await highlighter.loadGrammar(grammar);
|
|
31
|
+
|
|
32
|
+
const html = highlighter.highlight(code, 'groovy');
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## What's included
|
|
36
|
+
|
|
37
|
+
This package contains:
|
|
38
|
+
|
|
39
|
+
- `grammar.js` - ES module that loads the WebAssembly grammar
|
|
40
|
+
- `grammar.d.ts` - TypeScript type definitions
|
|
41
|
+
- `grammar_bg.wasm` - The tree-sitter grammar compiled to WebAssembly
|
|
42
|
+
|
|
43
|
+
## About Arborium
|
|
44
|
+
|
|
45
|
+
This package is part of [**Arborium**](https://github.com/bearcove/arborium), a collection of tree-sitter grammars for syntax highlighting, maintained by [Amos Wenger](https://fasterthanli.me).
|
|
46
|
+
|
|
47
|
+
Arborium provides:
|
|
48
|
+
- **98+ language grammars** compiled to WebAssembly
|
|
49
|
+
- **Browser and Node.js support** via ES modules
|
|
50
|
+
- **TypeScript definitions** for all packages
|
|
51
|
+
- **Consistent API** across all grammars
|
|
52
|
+
|
|
53
|
+
## Related packages
|
|
54
|
+
|
|
55
|
+
- [`@arborium/arborium`](https://www.npmjs.com/package/@arborium/arborium) - Core highlighter library
|
|
56
|
+
- [All @arborium packages](https://www.npmjs.com/org/arborium)
|
|
57
|
+
|
|
58
|
+
## License
|
|
59
|
+
|
|
60
|
+
MIT OR Apache-2.0
|
|
61
|
+
|
|
62
|
+
## Links
|
|
63
|
+
|
|
64
|
+
- [GitHub](https://github.com/bearcove/arborium)
|
|
65
|
+
- [Issues](https://github.com/bearcove/arborium/issues)
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@arborium/groovy",
|
|
3
|
+
"version": "2.4.0",
|
|
4
|
+
"description": "Syntax highlighting for Groovy, powered by WebAssembly",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./grammar.js",
|
|
7
|
+
"module": "./grammar.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": "./grammar.js",
|
|
10
|
+
"./grammar.js": "./grammar.js",
|
|
11
|
+
"./grammar_bg.wasm": "./grammar_bg.wasm"
|
|
12
|
+
},
|
|
13
|
+
"files": ["grammar.js", "grammar_bg.wasm"],
|
|
14
|
+
"sideEffects": false,
|
|
15
|
+
"keywords": [
|
|
16
|
+
"arborium",
|
|
17
|
+
"syntax-highlighting",
|
|
18
|
+
"tree-sitter",
|
|
19
|
+
"groovy",
|
|
20
|
+
"Groovy",
|
|
21
|
+
"wasm"
|
|
22
|
+
],
|
|
23
|
+
"author": "Amos Wenger <amos@bearcove.eu>",
|
|
24
|
+
"license": "MIT OR Apache-2.0",
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "https://github.com/bearcove/arborium"
|
|
28
|
+
},
|
|
29
|
+
"homepage": "https://github.com/bearcove/arborium",
|
|
30
|
+
"bugs": {
|
|
31
|
+
"url": "https://github.com/bearcove/arborium/issues"
|
|
32
|
+
},
|
|
33
|
+
"funding": {
|
|
34
|
+
"type": "github",
|
|
35
|
+
"url": "https://github.com/sponsors/fasterthanlime"
|
|
36
|
+
},
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=18"
|
|
39
|
+
},
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"access": "public"
|
|
42
|
+
}
|
|
43
|
+
}
|