https://github.com/cowprotocol/learn
Learn - CoW Tutorials
https://github.com/cowprotocol/learn
Last synced: 11 months ago
JSON representation
Learn - CoW Tutorials
- Host: GitHub
- URL: https://github.com/cowprotocol/learn
- Owner: cowprotocol
- License: mit
- Created: 2023-10-30T11:31:51.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-16T17:08:47.000Z (about 1 year ago)
- Last Synced: 2025-04-17T01:34:57.191Z (about 1 year ago)
- Language: Svelte
- Homepage: https://learn.cow.fi
- Size: 4.46 MB
- Stars: 0
- Watchers: 4
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# CoW Tutorials
A grass-to-glass tutorial on how to build with CoW Protocol.
## Setup
This repo uses [yarn](https://yarnpkg.com/).
## Developing the app
First, run `node scripts/create-common-bundle`. This packages up everything that's needed to run the app within the webcontainer (Vite, typescript, CoW dependencies, etc.) which can subsequently be unpacked on a server to create and run an instance of a CoW application (which powers the output window of the tutorial). Then, run `dev`:
```bash
node scripts/create-common-bundle
yarn dev
```
To build for production and run locally:
```bash
yarn build
yarn preview
```
## Creating new tutorials
Tutorials live inside `content`. Each tutorial consists of a `README.md`, which is the text to the left, and `app-a` and `app-b` folders, which represent the initial and solved state. Files that stay the same can be omitted from `app-b`. Files are marked as deleted in `app-b` if they start with `__delete`. Folders that are marked as deleted in `app-b` if they contain a file named `__delete`.
## Bumping tutorial dependencies
Bump the dependency (for example `cow-sdk`) in both the root and the `content/common` `package.json`. In the root do `yarn` (to update `yarn.lock`), in `content/common` do `yarn` (to update `yarn.lock`).
## Acknowledgements
These tutorials build off of the excellent work from the team who created the [SvelteKit tutorials](https://learn.svelte.dev/). Without their work, this would not have been possible.