Skip to content

Commit

Permalink
feat(web)!: rewrite the library in TypeScript
Browse files Browse the repository at this point in the history
  • Loading branch information
amaanq committed Jan 21, 2025
1 parent 07a86b1 commit 2cae678
Show file tree
Hide file tree
Showing 39 changed files with 7,854 additions and 3,627 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ test/fuzz/out
test/fixtures/grammars/*
!test/fixtures/grammars/.gitkeep

package-lock.json
node_modules

docs/assets/js/tree-sitter.js
Expand Down
22 changes: 0 additions & 22 deletions lib/binding_web/.eslintrc.js

This file was deleted.

4 changes: 3 additions & 1 deletion lib/binding_web/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
dist/
/tree-sitter.js
/tree-sitter.js.map
/tree-sitter.wasm
package-lock.json
/tree-sitter.wasm.map
node_modules
*.tgz
LICENSE
8 changes: 8 additions & 0 deletions lib/binding_web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ await Parser.init();
// the library is ready
```

To install a debug version of the library, pass in `--debug` when running `npm install`:

```sh
npm install web-tree-sitter --debug
```

This will load the debug version of the `.wasm` file, which includes sourcemaps for both the JS and WASM files, debug symbols, and assertions.

### Basic Usage

First, create a parser:
Expand Down
Loading

0 comments on commit 2cae678

Please sign in to comment.