2022-11-04 12:06:06 -07:00
|
|
|
all: clean build format test bundle
|
|
|
|
|
2022-11-01 15:00:00 -07:00
|
|
|
clean:
|
2022-11-03 22:49:06 -07:00
|
|
|
yarn node-gyp clean
|
2022-11-01 15:00:00 -07:00
|
|
|
rm -rf build
|
2022-11-04 18:47:30 -07:00
|
|
|
rm -rf dist
|
2022-11-03 12:57:46 -07:00
|
|
|
rm -f *.node
|
|
|
|
rm -f *.a
|
|
|
|
rm -f *.o
|
|
|
|
|
2023-03-09 10:21:28 -06:00
|
|
|
build: src/kzg.cxx lib/kzg.ts package.json binding.gyp Makefile
|
2023-02-08 11:35:33 -06:00
|
|
|
cd ../../src && make c_kzg_4844.o && cp c_kzg_4844.o ../bindings/node.js
|
2022-11-22 12:11:05 -08:00
|
|
|
yarn install
|
2022-11-03 22:49:06 -07:00
|
|
|
yarn node-gyp rebuild
|
|
|
|
|
2022-11-03 22:52:34 -07:00
|
|
|
test: build
|
2022-11-03 22:49:06 -07:00
|
|
|
yarn jest
|
|
|
|
|
|
|
|
format:
|
|
|
|
yarn prettier --write .
|
|
|
|
|
2022-11-04 18:47:30 -07:00
|
|
|
bundle: clean
|
2023-03-09 10:21:28 -06:00
|
|
|
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
|
2022-11-04 18:47:30 -07:00
|
|
|
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
|
|
|
|
|
2022-11-05 00:36:38 -07:00
|
|
|
publish: bundle
|
2023-03-09 10:21:28 -06:00
|
|
|
cd dist
|
|
|
|
npm publish
|
2022-11-08 08:38:07 -08:00
|
|
|
|
|
|
|
linux-test: bundle
|
|
|
|
docker build -t "linux-test" .
|
|
|
|
docker logs --follow `docker run -d linux-test`
|