Open
Description
Summary
Provide a simplified abstraction around CosmWasm/ts-codegen. This should be usable from the top-level justfile
.
- Make a command that runs
ts-codegen
for everything to an output dir likedist
. - ci: Add a manually runnable workflow to publish TypeScript code intended for app.nibiru.fi.
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
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status