Have gyp copy the .node file
This commit is contained in:
parent
3f66b35664
commit
92242c725b
|
@ -6,11 +6,9 @@ clean:
|
||||||
rm -f *.a
|
rm -f *.a
|
||||||
rm -f *.o
|
rm -f *.o
|
||||||
|
|
||||||
build: kzg.cxx kzg.ts package.json Makefile
|
build: kzg.cxx kzg.ts package.json binding.gyp Makefile
|
||||||
cd ../../src; make lib
|
cd ../../src; make lib
|
||||||
yarn node-gyp rebuild
|
yarn node-gyp rebuild
|
||||||
cp build/Release/kzg.node .
|
|
||||||
cp build/Release/kzg.node ./dist
|
|
||||||
|
|
||||||
test: build
|
test: build
|
||||||
yarn jest
|
yarn jest
|
||||||
|
|
|
@ -22,6 +22,21 @@
|
||||||
],
|
],
|
||||||
"dependencies": ["<!(node -p \"require('node-addon-api').gyp\")"],
|
"dependencies": ["<!(node -p \"require('node-addon-api').gyp\")"],
|
||||||
"defines": ["NAPI_DISABLE_CPP_EXCEPTIONS"]
|
"defines": ["NAPI_DISABLE_CPP_EXCEPTIONS"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"target_name": "action_after_build",
|
||||||
|
"type": "none",
|
||||||
|
"dependencies": ["kzg"],
|
||||||
|
"copies": [
|
||||||
|
{
|
||||||
|
"files": ["./build/Release/kzg.node"],
|
||||||
|
"destination": "."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"files": ["./build/Release/kzg.node"],
|
||||||
|
"destination": "./dist"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
"author": "Dan Coffman",
|
"author": "Dan Coffman",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "dist/kzg.js",
|
"main": "dist/kzg.js",
|
||||||
|
"types": "dist/dts/kzg.d.ts",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/preset-typescript": "^7.18.6",
|
"@babel/preset-typescript": "^7.18.6",
|
||||||
"@rollup/plugin-typescript": "^9.0.2",
|
"@rollup/plugin-typescript": "^9.0.2",
|
||||||
|
|
Loading…
Reference in New Issue