Skip to content

Commit

Permalink
Merge pull request #140 from Concordium/kb/integrate-ccd-js-gen
Browse files Browse the repository at this point in the history
Support generating TypeScript/JavaScript clients using ccd-js-gen
  • Loading branch information
Bargsteen authored Dec 12, 2023
2 parents c1076c1 + c733a34 commit 1c6fc81
Show file tree
Hide file tree
Showing 13 changed files with 1,462 additions and 245 deletions.
7 changes: 6 additions & 1 deletion vscode-smart-contracts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## Unreleased

- Add support for generating TypeScript/JavaScript clients for smart contract modules via the [ccd-js-gen](https://www.npmjs.com/package/@concordium/ccd-js-gen) tool.
- Adds two commands: one for generating ts/js clients, and one for getting the version of the ccd-js-gen executable.
- Adds settings for using a custom ccd-js-gen executable and to provide additional arguments when running it.
- Adds a task for running the ccd-js-gen tool.

## 2.1.0

- Contains `cargo-concordium` version 3.1.4
Expand All @@ -27,4 +32,4 @@
## 1.0.1

- Initial release
- Contains `cargo-concordium` version 2.8.0
- Contains `cargo-concordium` version 2.8.0
22 changes: 17 additions & 5 deletions vscode-smart-contracts/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Concordium Smart Contract extension for VS Code

This extension provides the functionality needed for [developing smart contracts](https://developer.concordium.software/en/mainnet/smart-contracts/general/introduction.html) for the [Concordium Blockchain](https://concordium.com/).
This extension provides the functionality needed for developing [smart contracts](https://developer.concordium.software/en/mainnet/smart-contracts/general/introduction.html) and dApps for the [Concordium Blockchain](https://concordium.com/).

Features provided by [`cargo-concordium`](https://github.com/Concordium/concordium-smart-contract-tools/tree/main/cargo-concordium) integrated into VS Code.
Features provided by [`cargo-concordium`](https://github.com/Concordium/concordium-smart-contract-tools/tree/main/cargo-concordium) and [`ccd-js-gen`](https://www.npmjs.com/package/@concordium/ccd-js-gen) integrated into VS Code.

## Features

Expand All @@ -24,6 +24,12 @@ Running the smart contract tests command.

![](https://github.com/Concordium/concordium-smart-contract-tools/raw/main/vscode-smart-contracts/assets/test-contract.gif)

### Command for generating TypeScript/JavaScript clients

Running the generate TypeScript/JavaScript clients command.

![](https://github.com/Concordium/concordium-smart-contract-tools/raw/main/vscode-smart-contracts/assets/generate-js-clients.gif)

### Provide tasks for smart contract projects

Searches the workspace for common smart contract tasks.
Expand All @@ -37,19 +43,25 @@ Just type `ccd` in your smart contract source file and let IntelliSense show you

## Requirements

The extension relies on [`rustup`](https://rustup.rs/) and [`cargo`](https://doc.rust-lang.org/cargo/) being installed and available in PATH.
The extension relies on the following tools, which must be installed and available on PATH.
- [`rustup`](https://rustup.rs/)
- [`cargo`](https://doc.rust-lang.org/cargo/)
- [`Node.js`](https://nodejs.org/en/)

## Extension Settings

This extension contributes the following settings:

* `concordium-smart-contracts.custom-executable`: `string | null` (default `null`) <br>
Provide a custom path to the cargo-concordium executable to use instead of the bundled one. Ex. `~/.cargo/bin/cargo-concordium`
Provide a custom path to the `cargo-concordium` executable to use instead of the bundled one. Ex. `~/.cargo/bin/cargo-concordium`
* `concordium-smart-contracts.additional-build-args`: `string[]` (default `[]`) <br>
Provide additional arguments for `cargo-concordium` when running the build smart contract command.
* `concordium-smart-contracts.additional-test-args`: `string[]` (default `[]`) <br>
Provide additional arguments for `cargo-concordium` when running the test smart contract command.

* `concordium-smart-contracts.custom-ccd-js-gen-executable`: `string | null` (default `null`) <br>
Provide a custom path to the `ccd-js-gen` executable to use instead of the bundled one. Ex. `/usr/local/lib/node_modules/.bin/ccd-js-gen`.
* `concordium-smart-contracts.additional-gen-js-args`: `string[]` (default `[]`) <br>
Provide additional arguments for `ccd-js-gen` when running.

## Release Notes

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 1c6fc81

Please sign in to comment.