Network-Goods / hypercerts-protocol

MIT License
13 stars 5 forks source link

feat(build): adding build system for hypercert abis, types, and contr… #50

Closed brossetti1 closed 1 year ago

brossetti1 commented 1 year ago

…act files

Description

https://github.com/Network-Goods/hypercerts-protocol/issues/9

this WIP pr contains the beginning of a build system to release the hypercert contracts, types, and abis as its own package to be included in external apps that want to interact with contracts.

Further Development

The package can be funneled down to only the contracts and types that need to be in final dist by removing or adding exports to the src/index.ts file and following the docs listed their.

I added a sort of cheap publish ci task - if you find it acceptable for now then{hypercerts-npm-org}would need to be replaced with the appropriate org name and NPM_TOKEN would need to be configured

Environment Variables

Screenshots:

The final build package at this moment looks like the below image, of course if some of these files are not needed, they could be removed from tsconfig.build.json and src/index.ts

Screen Shot 2022-11-18 at 6 59 04 PM
bitbeckers commented 1 year ago

Added to project board to make sure we incorporate the publishing of contract types in the refactoring

bitbeckers commented 1 year ago

Thanks for this PR!

I've forked your code into: https://github.com/Network-Goods/hypercerts-protocol/pull/65 so I think you can close this one if you want. Feel free to continue contributing in the dev branch

brossetti1 commented 1 year ago

closing - 🔥