rain-game-sdk v2.0.2-beta
Rain Game SDK
An in-progress SDK for interacting with Rain Game Engine factories and child contracts.
This SDK uses an ethers.js interface.
Development setup (for contributors)
Nix shell
Install the nix shell if you haven't already.
curl -L https://nixos.org/nix/install | shDrop into a nix-shell.
nix-shellThe shell hook will:
yarn install- Compile the @beehive-innovation/rain-game-engine dependencies
- Copy the compiled typechain files into src/typechain.
Commands
This library uses TSDX to compile and bundle. To run TSDX, use:
yarn startThis builds to /dist and runs the project in watch mode so any edits you save inside src causes a rebuild to /dist.
To do a one-off build, use yarn build.
To run tests, use yarn test.
Bundle Analysis
size-limit is set up to calculate the library size with yarn size and visualize the bundle with yarn analyze.
Generate documentation
To generate the documentation you should drop into nix-shell and run:
generate-docsThis will generate the docs files in the docs/markdown directory. You can change the output directory editing the package.json file, where the command generate-docs is set. For example, change the output folder from docs/markdown to myDocs/ in the -o flag:
Change this:
"generate-docs": "yarn build && api-extractor run --local && api-documenter markdown -i docs/input -o docs/markdown"To have this:
"generate-docs": "yarn build && api-extractor run --local && api-documenter markdown -i docs/input -o myDocs"3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago