Skip to content

Commit

Permalink
Add Node.js binding info and adjust package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
sogaiu committed Mar 4, 2023
1 parent d99a6b8 commit ef1667f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
13 changes: 13 additions & 0 deletions doc/what-and-why.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,19 @@ They may be removed at some point, but they should be straight-forward
to generate as long as one has a suitable `tree-sitter` cli and the
`grammar.js` file mentioned above.

In order to successfully build the Node.js bindings (say, by an
invocation of `npx node-gyp rebuild`), something like the following
may need to be added to `package.json`:

```json
"main": "bindings/node",
"dependencies": {
"nan": "2.14.2"
},
```

Note that the version of `nan` may need to be checked.

## Footnotes

[1] The file `package.json` may also be required if it's important to
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "tree-sitter-clojure",
"version": "0.0.12",
"description": "Clojure grammar for tree-sitter",
"main": "bindings/node",
"tree-sitter": [
{
"scope": "source.clojure",
Expand Down

0 comments on commit ef1667f

Please sign in to comment.