mirror of
https://github.com/status-im/c-kzg-4844.git
synced 2025-01-20 06:59:00 +00:00
2642595e39
* refactor(node-bindings): create src/lib/test folders * feat(node-bindings): update bundle/publish commands * refactor(node-bindings): remove unused files and dependencies * refactor(node-bindings): move fixtures to __fixtures__ * fix(node-bindings): revert format of fixture json file * fix(node-bindings): prettierignore and gitignore * feat(node-bindings): add bindings package * fix(node-bindings): fix test setup path * fix(node-bindings): remove post-build copy action in bindings.gyp * fix(node-bindings): package.json keys * Update contributors --------- Co-authored-by: George Kadianakis <desnacked@riseup.net>
41 lines
837 B
Makefile
41 lines
837 B
Makefile
all: clean build format test bundle
|
|
|
|
clean:
|
|
yarn node-gyp clean
|
|
rm -rf build
|
|
rm -rf dist
|
|
rm -f *.node
|
|
rm -f *.a
|
|
rm -f *.o
|
|
|
|
build: src/kzg.cxx lib/kzg.ts package.json binding.gyp Makefile
|
|
cd ../../src && make c_kzg_4844.o && cp c_kzg_4844.o ../bindings/node.js
|
|
yarn install
|
|
yarn node-gyp rebuild
|
|
|
|
test: build
|
|
yarn jest
|
|
|
|
format:
|
|
yarn prettier --write .
|
|
|
|
bundle: clean
|
|
mkdir dist
|
|
cp README.md dist/README.md
|
|
cp package.json dist/package.json
|
|
cp binding.dist.gyp dist/binding.gyp
|
|
node_modules/.bin/tsc -p tsconfig.build.json
|
|
cp -r src dist/src
|
|
mkdir -p dist/deps/c-kzg
|
|
cp -r ../../blst dist/deps
|
|
cp ../../src/c_kzg_4844.c dist/deps/c-kzg
|
|
cp ../../src/c_kzg_4844.h dist/deps/c-kzg
|
|
|
|
publish: bundle
|
|
cd dist
|
|
npm publish
|
|
|
|
linux-test: bundle
|
|
docker build -t "linux-test" .
|
|
docker logs --follow `docker run -d linux-test`
|