diff --git a/doc/what-and-why.md b/doc/what-and-why.md index 1029e5f..ad27d70 100644 --- a/doc/what-and-why.md +++ b/doc/what-and-why.md @@ -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 diff --git a/package.json b/package.json index 91d44c1..66326ca 100644 --- a/package.json +++ b/package.json @@ -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",