mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-14 00:27:12 +00:00
c11c4b0e3e
* build(examples): support process management * build(examples): manage trunk * build(examples): manage cargo leptos * doc(examples): add run instructions |
||
---|---|---|
.. | ||
animated_show | ||
cargo-make | ||
counter | ||
counter_isomorphic | ||
counter_url_query | ||
counter_without_macros | ||
counters | ||
counters_stable | ||
error_boundary | ||
errors_axum | ||
fetch | ||
gtk | ||
hackernews | ||
hackernews_axum | ||
hackernews_islands_axum | ||
js-framework-benchmark | ||
leptos-tailwind-axum | ||
login_with_token_csr_only | ||
parent_child | ||
router | ||
session_auth_axum | ||
slots | ||
ssr_modes | ||
ssr_modes_axum | ||
suspense_tests | ||
tailwind | ||
tailwind_csr_trunk | ||
timer | ||
todo_app_sqlite | ||
todo_app_sqlite_axum | ||
todo_app_sqlite_viz | ||
todomvc | ||
Makefile.toml | ||
README.md |
Examples README
Main Branch
The examples in this directory are all built and tested against the current main
branch.
To the extent that new features have been released or breaking changes have been made since the previous release, the examples are compatible with the main
branch but not the current release.
To see the examples as they were at the time of the 0.4.9
release, click here.
Prerequisites
Example projects depend on the following tools. Please install them as needed.
- Rust
- Nightly Rust
- Run
rustup toolchain install nightly
- Run
rustup target add wasm32-unknown-unknown
- Run
- Cargo Make
- Run
cargo install --force cargo-make
- Setup a command alias like
alias cm='cargo make'
to reduce typing (Optional)
- Run
- Node Version Manager (Optional)
- Node.js
- pnpm (Optional)
Getting Started
Follow these steps to get any example up and running.
cd
to the example root directory- Run
cargo make ci
to setup and test the example - Run
cargo make start
to run the example - Open the client URL in the console output (http://127.0.0.1:8080 or http://127.0.0.1:3000 by default)
Cargo Make
Cargo Make supports ci
and common development tasks.
Here are the highlights.
- Extendable custom task files are located in the cargo-make directory
- Running a task will automatically install
cargo
dependencies - Each
Makefile.toml
file must extend the cargo-make/main.toml file - cargo-make files that end in
*-test.toml
configure end-to-end web testing - Run
cargo make test-report
to learn which examples have web tests