This repository contains the assets generator for the Dune project.
You can either download the generated
directory from the repository or direct link to the images in this repository.
- Create a GitHub account and fork this repository.
- Ensure you can run
git
andbash
scripts on your system. helpful guide - Ensure you have
npm
andnode
installed on your system. - Ensure you have
VSCode
installed on your system. (or any other code editor of your choice). - Install
Bun
on your system. - Clone your forked repository to your local system.
- Open the cloned repository in
VSCode
. - Install the recommended extensions for
VSCode
suggested by the repository. - Run
bun install
in the terminal to install the required dependencies. - Optionally: Run
npx playwright install chromium
in the terminal to install the headless browser used for capturing. - Run
bun run storybook
in the terminal to start the storybook server. - Your browser should open up with the storybook. - Edit or Add any
*.stories.tsx
files within thesrc
directory to add/edit any assets. - Commit your changes and push them to your forked repository.
- Create a pull request to the original repository.
Run bun run local-capture
in the terminal to capture the assets locally.
This only captures missing assets, so if you want to recapture an asset, you need to delete the existing asset first.
To capture all assets, run bun run build-storybook && bun run ./scripts/capture.ts
.
It is strongly discouraged to commit the generated assets to the repository. The CI will automatically capture all assets on every push to the main
branch, and override the manually committed ones, due to small platform rendering inconsistencies.
The CI will automatically capture missing assets on every push to the main
branch.
Which will happen the moment your pull request is merged.
From that moment on the assets will be available in the generated
directory.
This file contains enums of all possible vectors that can be used in assets.
This file is generated for convience, and should not be edited manually.
To regenerate this file, run bun run generate
.
It is important to regenerate this file after adding/renaming vectors.
bun run generate
- Regeneratessrc/data/generated.ts
.bun run local-capture
- Captures missing assets locally.bun run build-storybook
- Builds the storybook.bun run storybook
- Starts the storybook server.bun run format
- Formats the code, including vectors.