azula
Version:
Lightweight GPU accelerated HTML GUI for Node
17 lines (12 loc) • 481 B
JavaScript
const fs = require("fs");
const path = require("path");
const pkg = require("./package.json");
let {platform} = process;
let addonPath = path.join(__dirname, `/build/Release/addon-${platform}.node`);
// make sure the bindings exist
if (!fs.existsSync(addonPath)) {
process.stderr.write(`Failed to load addon from '${addonPath}'\n`);
process.stderr.write(`Your platform might not be supported\n`);
throw `Exiting..`;
}
module.exports = require(addonPath);