@xahau/hooks-cli
v2.0.5
Published
## Global Usage (For Using as a CLI)
Readme
Hooks CLI
Global Usage (For Using as a CLI)
Install:
npm i -g @xahau/hooks-cliUse:
You can initialize a new project by running:
hooks-cli initTo build the c contracts, run:
hooks-cli compile-c contracts build --headers headersor (alias)
c2wasm-cli contracts build --headers headersThis will compile the contracts directory and output the .wasm files into the build directory.
To build the js contracts, run:
hooks-cli compile-js contracts/base.ts buildor (alias)
js2qjsc-cli contracts/base.ts buildThis will compile the base.ts file and output the .bc file into the build directory.
To listen to the debug stream, run:
hooks-cli debug "Account 1" rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCnSDK Usage (For Using as an SDK)
Install:
npm install @xahau/hooks-cliUsage:
import { buildDir } from "@xahau/hooks-cli";
const dirPath = "my/path/to/hooks/root/dir";
const outDir = "my/build/wasm/directory";
await buildDir(dirPath, outDir);Development / Deployment
Build Repo
yarn run buildBuild Executable Package
pkg .Publish NPM Package
npm publish --access=public