Add register script
This commit is contained in:
parent
5d323c0d62
commit
61ce6b1ead
|
@ -13,10 +13,8 @@
|
|||
"lib/**/*.js",
|
||||
"lib/**/*.js.map",
|
||||
"lib/**/*.d.ts",
|
||||
"blst-native.*",
|
||||
"browser.*",
|
||||
"herumi.*",
|
||||
"node."
|
||||
"*.d.ts",
|
||||
"*.js"
|
||||
],
|
||||
"keywords": [
|
||||
"ethereum",
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
const {init} = require("./lib");
|
||||
|
||||
// -----------------------------------------
|
||||
// To be used in NodeJS testing environments
|
||||
// node -r @chainsafe/bls/register
|
||||
// -----------------------------------------
|
||||
|
||||
// blst-native initialization is syncronous
|
||||
// Initialize bls here instead of in before() so it's available inside describe() blocks
|
||||
init("blst-native").catch((e) => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(e);
|
||||
process.exit(1);
|
||||
});
|
Reference in New Issue