#javascript #cli #bindings #command-line-tool #candid #typescript-bindings #didc

app junobuild-didc

A CLI tool for generating JavaScript or TypeScript content from a DID file using the didc tool

1 unstable release

0.0.1 Sep 9, 2024

#7 in #candid

MIT license

18KB

JunoBuild-Didc

junobuild-didc is a CLI tool for generating JavaScript or TypeScript content from a DID file using the didc tool.

This utility is designed to be integrated in Juno's CLI.

Installation

You can install junobuild-didc globally using Cargo by running:

cargo install junobuild-didc

Usage

You can use the junobuild-didc command to generate JavaScript or TypeScript bindings from a DID file.

junobuild-didc --input <input_file.did> --target <js|ts> [--output <output_file>]

Example

junobuild-didc --input ./path/to/interface.did --target ts --output ./generated/output.ts
  • --input or -i: Path to the .did file.
  • --target or -t: Choose either js for JavaScript or ts for TypeScript output.
  • --output or -o: (Optional) Specify the output file. If omitted, the generated content will be printed to the console.

Development

Building from Source

If you want to build the tool from the source, you can clone the repository and build it yourself.

git clone https://github.com/junobuild/didc
cd didc
cargo build --release

Running Tests

You can run the tests with:

cargo test

License

This project is licensed under the MIT License. See the LICENSE file for details.

Dependencies

~6–14MB
~156K SLoC