@arborium/solidity 2.6.0 → 2.6.1
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/grammar_bg.wasm +0 -0
- package/package.json +1 -1
- package/README.md +0 -65
package/grammar_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/README.md
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
# @arborium/solidity
|
|
2
|
-
|
|
3
|
-
[](https://github.com/bearcove/arborium)
|
|
4
|
-
[](https://www.npmjs.com/package/@arborium/solidity)
|
|
5
|
-
[](https://github.com/bearcove/arborium)
|
|
6
|
-
|
|
7
|
-
Syntax highlighting for [Solidity](https://en.wikipedia.org/wiki/Solidity), powered by WebAssembly and [tree-sitter](https://tree-sitter.github.io/).
|
|
8
|
-
|
|
9
|
-
> Solidity is a programming language for implementing smart contracts on various blockchain platforms, most notably, Ethereum.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
| | |
|
|
13
|
-
|---|---|
|
|
14
|
-
| **Inventor** | Gavin Wood |
|
|
15
|
-
| **Year** | 2014 |
|
|
16
|
-
|
|
17
|
-
## Installation
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
npm install @arborium/solidity
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Usage
|
|
24
|
-
|
|
25
|
-
```javascript
|
|
26
|
-
import { createHighlighter } from '@arborium/arborium';
|
|
27
|
-
import * as grammar from '@arborium/solidity';
|
|
28
|
-
|
|
29
|
-
const highlighter = await createHighlighter();
|
|
30
|
-
await highlighter.loadGrammar(grammar);
|
|
31
|
-
|
|
32
|
-
const html = highlighter.highlight(code, 'solidity');
|
|
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)
|