leptos/examples
2023-12-11 20:25:10 -05:00
..
animated_show docs: make it easy to see how to run each example in its README (#2085) 2023-11-28 11:47:56 -05:00
cargo-make fix(examples/error_boundary): ci error (#1739) 2023-09-17 20:38:03 -04:00
counter docs: make it easy to see how to run each example in its README (#2085) 2023-11-28 11:47:56 -05:00
counter_isomorphic feat: add support for placing attributes on server functions (#2093) 2023-12-01 15:36:52 -05:00
counter_url_query docs: make it easy to see how to run each example in its README (#2085) 2023-11-28 11:47:56 -05:00
counter_without_macros docs: make it easy to see how to run each example in its README (#2085) 2023-11-28 11:47:56 -05:00
counters docs: make it easy to see how to run each example in its README (#2085) 2023-11-28 11:47:56 -05:00
counters_stable docs: make it easy to see how to run each example in its README (#2085) 2023-11-28 11:47:56 -05:00
directives docs: make it easy to see how to run each example in its README (#2085) 2023-11-28 11:47:56 -05:00
error_boundary docs: make it easy to see how to run each example in its README (#2085) 2023-11-28 11:47:56 -05:00
errors_axum change: enable inline children for For by switching to children and bind: (#1773) 2023-09-26 14:24:02 -04:00
fetch docs: make it easy to see how to run each example in its README (#2085) 2023-11-28 11:47:56 -05:00
gtk v0.5.1 2023-10-06 09:40:23 -04:00
hackernews docs: make it easy to see how to run each example in its README (#2085) 2023-11-28 11:47:56 -05:00
hackernews_axum chore: Bump http from 0.2.8 to 0.2.11. (#2068) 2023-11-29 07:36:03 -05:00
hackernews_islands_axum chore: Bump http from 0.2.8 to 0.2.11. (#2068) 2023-11-29 07:36:03 -05:00
hackernews_js_fetch chore: Bump http from 0.2.8 to 0.2.11. (#2068) 2023-11-29 07:36:03 -05:00
js-framework-benchmark docs: make it easy to see how to run each example in its README (#2085) 2023-11-28 11:47:56 -05:00
login_with_token_csr_only does this make clippy happy in CI? (#1965) 2023-10-29 21:48:33 -04:00
parent_child docs: make it easy to see how to run each example in its README (#2085) 2023-11-28 11:47:56 -05:00
portal docs: make it easy to see how to run each example in its README (#2085) 2023-11-28 11:47:56 -05:00
router docs: make it easy to see how to run each example in its README (#2085) 2023-11-28 11:47:56 -05:00
session_auth_axum examples: ergonomic improvements to session_auth_axum (#2057) 2023-12-10 14:28:42 -05:00
slots docs: make it easy to see how to run each example in its README (#2085) 2023-11-28 11:47:56 -05:00
ssr_modes docs: make it easy to see how to run each example in its README (#2085) 2023-11-28 11:47:56 -05:00
ssr_modes_axum docs: make it easy to see how to run each example in its README (#2085) 2023-11-28 11:47:56 -05:00
suspense_tests docs: make it easy to see how to run each example in its README (#2085) 2023-11-28 11:47:56 -05:00
tailwind_actix examples: change output names to clarify Tailwind examples (#2102) 2023-12-11 20:25:10 -05:00
tailwind_axum examples: change output names to clarify Tailwind examples (#2102) 2023-12-11 20:25:10 -05:00
tailwind_csr docs: make it easy to see how to run each example in its README (#2085) 2023-11-28 11:47:56 -05:00
timer docs: make it easy to see how to run each example in its README (#2085) 2023-11-28 11:47:56 -05:00
todo_app_sqlite docs: make it easy to see how to run each example in its README (#2085) 2023-11-28 11:47:56 -05:00
todo_app_sqlite_axum chore: Bump http from 0.2.8 to 0.2.11. (#2068) 2023-11-29 07:36:03 -05:00
todo_app_sqlite_csr chore: Bump http from 0.2.8 to 0.2.11. (#2068) 2023-11-29 07:36:03 -05:00
todo_app_sqlite_viz chore: Bump http from 0.2.8 to 0.2.11. (#2068) 2023-11-29 07:36:03 -05:00
todomvc docs: make it easy to see how to run each example in its README (#2085) 2023-11-28 11:47:56 -05:00
Makefile.toml examples: rename Tailwind examples (#1875) 2023-10-13 16:20:26 -04:00
README.md docs: add instruction to install trunk to examples/README.md (#2064) 2023-11-24 14:06:02 -05:00
SSR_NOTES.md doc(examples): reference run instructions (#1705) 2023-09-13 19:57:50 -04:00

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.5.0 release, click here.

Cargo Make

Cargo Make is used to build, test, and run examples.

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 web testing strategies
  • Run cargo make test-report to learn which examples have web tests

Getting Started

Follow these steps to get any example up and running.

  1. cd to the example root directory
  2. Run cargo make ci to setup and test the example
  3. Run cargo make start to run the example
  4. Open the client URL in the console output (http://127.0.0.1:8080 or http://127.0.0.1:3000 by default)

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
  • Cargo Make
    • Run cargo install --force cargo-make
    • Setup a command alias like alias cm='cargo make' to reduce typing (Optional)
  • Trunk
    • Run cargo install trunk
  • Node Version Manager (Optional)
  • Node.js
  • pnpm (Optional)