diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-04-18 11:07:53 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-04-18 11:35:24 +0200 |
commit | 4b160d1b2119cd2007ea7a76d4baba56ad66b825 (patch) | |
tree | a6c5d491c8306304cc9ec112ffedcae4ff6bced3 /bindings/node/index.js | |
parent | 1f10ff9a6039a50e2f7be394fc22b1400832cf17 (diff) |
Support comments… sortav1.2.0
Diffstat (limited to 'bindings/node/index.js')
-rw-r--r-- | bindings/node/index.js | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/bindings/node/index.js b/bindings/node/index.js index d0bc87e..6657bcf 100644 --- a/bindings/node/index.js +++ b/bindings/node/index.js @@ -1,18 +1,6 @@ -try { - module.exports = require("../../build/Release/tree_sitter_gsp_binding"); -} catch (error1) { - if (error1.code !== 'MODULE_NOT_FOUND') { - throw error1; - } - try { - module.exports = require("../../build/Debug/tree_sitter_gsp_binding"); - } catch (error2) { - if (error2.code !== 'MODULE_NOT_FOUND') { - throw error2; - } - throw error1 - } -} +const root = require("path").join(__dirname, "..", ".."); + +module.exports = require("node-gyp-build")(root); try { module.exports.nodeTypeInfo = require("../../src/node-types.json"); |