Start working on NPM publish

This commit is contained in:
dancoffman 2022-11-04 18:47:30 -07:00
parent 1d1254e380
commit c033f782b8
No known key found for this signature in database
GPG Key ID: 47B1F53E36A9B3CC
4 changed files with 31 additions and 4 deletions

View File

@ -0,0 +1,16 @@
.vscode
build
node_modules
.gitignore
.npmignore
.prettierignore
.prettierrc.json
*.o
*.node
test.ts
kzg.ts
jest.config.js
rollup.config.js
tsconfig.json
babel.config.js
dist/blst/bindings

View File

@ -3,8 +3,8 @@ all: clean build format test bundle
clean:
yarn node-gyp clean
rm -rf build
rm -rf dist
rm -f *.node
rm -f dist/kzg.node
rm -f *.a
rm -f *.o
@ -18,5 +18,12 @@ test: build
format:
yarn prettier --write .
bundle:
bundle: clean
yarn rollup --config rollup.config.js --bundleConfigAsCjs
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:
npm publish

View File

@ -1,6 +1,6 @@
{
"name": "c-kzg",
"version": "0.0.1",
"version": "0.0.2",
"description": "NodeJS bindings for C-KZG",
"author": "Dan Coffman",
"license": "MIT",

View File

@ -6,5 +6,9 @@ export default {
dir: "dist",
format: "cjs",
},
plugins: [typescript()],
plugins: [
typescript({
exclude: ["test.ts"],
}),
],
};