Files
tree-sitter-jhcl/bindings/node/index.js

12 lines
452 B
JavaScript
Raw Normal View History

const root = require("path").join(__dirname, "..", "..");
2025-05-09 10:06:33 +03:00
module.exports =
typeof process.versions.bun === "string"
// Support `bun build --compile` by being statically analyzable enough to find the .node file at build-time
? require(`../../prebuilds/${process.platform}-${process.arch}/tree-sitter-hcl.node`)
: require("node-gyp-build")(root);
2022-06-18 04:40:10 -06:00
try {
module.exports.nodeTypeInfo = require("../../src/node-types.json");
2025-05-09 10:06:33 +03:00
} catch (_) {}