Summary
Provide a simplified abstraction around CosmWasm/ts-codegen. This should be usable from the top-level justfile.
Intent / Motivation
-
Dev X and Reduced Complexity: Simplifying the interactions with ts-codegen will help eliminate the need to remember or input intricate command specifics.
-
Unified Output Directory: Centralizing generated code into a directory like dist fosters organization and ensures uniformity across the repo.
-
Better Publishing: A publishing workflow for the TypeScript code will simplify the process of sharing or distributing the generated code, reducing manual steps and potential errors.
Basic Usage for Getting Started
Install
npm install -g @cosmwasm/ts-codegen
Generating a client
# Template: Using the "client" plugin
cosmwasm-ts-codegen generate \
--plugin client \
--schema [path-to-schema-dir] \
--out [path-to-ts-out-dir] \
--name [contract-crate-name] \
--no-bundle
# Example: Using the "client" plugin
cosmwasm-ts-codegen generate \
--plugin client \
--schema ./schema \
--out ./ts \
--name SG721 \
--no-bundle
Generally, everything we need is some variation on cosmwasm-ts-codegen generate
Summary
Provide a simplified abstraction around CosmWasm/ts-codegen. This should be usable from the top-level
justfile.ts-codegenfor everything to an output dir likedist.Intent / Motivation
Dev X and Reduced Complexity: Simplifying the interactions with
ts-codegenwill help eliminate the need to remember or input intricate command specifics.Unified Output Directory: Centralizing generated code into a directory like
distfosters organization and ensures uniformity across the repo.Better Publishing: A publishing workflow for the TypeScript code will simplify the process of sharing or distributing the generated code, reducing manual steps and potential errors.
Basic Usage for Getting Started
Install
Generating a client
Generally, everything we need is some variation on
cosmwasm-ts-codegen generate