Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ build/dependencies

# examples
examples/generated/
output/

# test
test/output/
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ See the [release workflow](.github/workflows/release_workflow.yaml) for release

The latest release can be downloaded from the [Releases](https://github.com/rive-app/rive-code-generator-wip/releases) page.

## Setup

See [CONTRIBUTING.md](./CONTRIBUTING.md) for detailed setup instructions.

## Usage

Run the code generator using:
Expand All @@ -64,15 +68,15 @@ Run the code generator using:
Example:

```sh
./build/out/lib/release/rive_code_generator -i ./examples/rive_files/animation.riv -o ./examples/generated_code.dart -l dart
./build/out/lib/debug/rive_code_generator -i ./samples/rewards.riv -o ./output/generated_code.dart -l dart
```

## Custom Templates

You can use custom Mustache templates for code generation:

```sh
./build/out/lib/release/rive_code_generator -i ./rive_files/ -o ./output/rive.json -t templates/json_template.mustache
./build/out/lib/debug/rive_code_generator -i ./samples/rewards.riv -o ./output/rive.dart -t templates/viewmodel_template.mustache
```

Sample templates are available in the [`templates`](./templates) directory.
Expand Down