2022-11-04 19:06:06 +00:00
|
|
|
all: clean build format test bundle
|
|
|
|
|
2022-11-01 22:00:00 +00:00
|
|
|
clean:
|
2022-11-04 05:49:06 +00:00
|
|
|
yarn node-gyp clean
|
2022-11-01 22:00:00 +00:00
|
|
|
rm -rf build
|
2022-11-05 01:47:30 +00:00
|
|
|
rm -rf dist
|
2022-11-03 19:57:46 +00:00
|
|
|
rm -f *.node
|
|
|
|
rm -f *.a
|
|
|
|
rm -f *.o
|
|
|
|
|
2022-11-04 06:14:11 +00:00
|
|
|
build: kzg.cxx kzg.ts package.json binding.gyp Makefile
|
2022-11-04 07:13:02 +00:00
|
|
|
cd ../../src; make lib
|
2022-11-04 05:49:06 +00:00
|
|
|
yarn node-gyp rebuild
|
|
|
|
|
2022-11-04 05:52:34 +00:00
|
|
|
test: build
|
2022-11-04 05:49:06 +00:00
|
|
|
yarn jest
|
|
|
|
|
|
|
|
format:
|
|
|
|
yarn prettier --write .
|
|
|
|
|
2022-11-05 01:47:30 +00:00
|
|
|
bundle: clean
|
2022-11-04 05:49:06 +00:00
|
|
|
yarn rollup --config rollup.config.js --bundleConfigAsCjs
|
2022-11-05 01:47:30 +00: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
|
|
|
|
|
|
|
|
publish:
|
2022-11-05 07:28:36 +00:00
|
|
|
mv binding.gyp binding.gyp.bak
|
|
|
|
mv binding.dist.gyp binding.gyp
|
2022-11-05 01:47:30 +00:00
|
|
|
npm publish
|
2022-11-05 07:28:36 +00:00
|
|
|
mv binding.gyp binding.dist.gyp
|
|
|
|
mv binding.gyp.bak binding.gyp
|