leptos/examples
Joseph Cruz c11c4b0e3e
build(examples): make it easier to run examples (#1697)
* build(examples): support process management
* build(examples): manage trunk
* build(examples): manage cargo leptos
* doc(examples): add run instructions
2023-09-12 10:46:16 -04:00
..
animated_show build(examples): make it easier to run examples (#1697) 2023-09-12 10:46:16 -04:00
cargo-make build(examples): make it easier to run examples (#1697) 2023-09-12 10:46:16 -04:00
counter build(examples): make it easier to run examples (#1697) 2023-09-12 10:46:16 -04:00
counter_isomorphic build(examples): make it easier to run examples (#1697) 2023-09-12 10:46:16 -04:00
counter_url_query build(examples): make it easier to run examples (#1697) 2023-09-12 10:46:16 -04:00
counter_without_macros build(examples): make it easier to run examples (#1697) 2023-09-12 10:46:16 -04:00
counters build(examples): make it easier to run examples (#1697) 2023-09-12 10:46:16 -04:00
counters_stable examples: add note about potential for memory leaks with nested signals (#1675) 2023-09-08 15:28:18 -04:00
error_boundary test(error_boundary): add e2e testing (#1651) 2023-09-04 13:25:44 -04:00
errors_axum build(examples): make it easier to run examples (#1697) 2023-09-12 10:46:16 -04:00
fetch build(examples): make it easier to run examples (#1697) 2023-09-12 10:46:16 -04:00
gtk feat/change: adopt reactive ownership model and drop cx/Scope (#918) 2023-08-21 19:31:37 -04:00
hackernews build(examples): make it easier to run examples (#1697) 2023-09-12 10:46:16 -04:00
hackernews_axum build(examples): make it easier to run examples (#1697) 2023-09-12 10:46:16 -04:00
hackernews_islands_axum feat: experimental islands (#1660) 2023-09-08 16:33:00 -04:00
js-framework-benchmark build(examples): make it easier to run examples (#1697) 2023-09-12 10:46:16 -04:00
leptos-tailwind-axum build(examples): make it easier to run examples (#1697) 2023-09-12 10:46:16 -04:00
login_with_token_csr_only build(examples): make it easier to run examples (#1697) 2023-09-12 10:46:16 -04:00
parent_child build(examples): make it easier to run examples (#1697) 2023-09-12 10:46:16 -04:00
router change: move logging macros into a logging module to avoid name conflicts with log and tracing (#1658) 2023-09-08 07:42:58 -04:00
session_auth_axum build(examples): make it easier to run examples (#1697) 2023-09-12 10:46:16 -04:00
slots build(examples): make it easier to run examples (#1697) 2023-09-12 10:46:16 -04:00
ssr_modes build(examples): make it easier to run examples (#1697) 2023-09-12 10:46:16 -04:00
ssr_modes_axum build(examples): make it easier to run examples (#1697) 2023-09-12 10:46:16 -04:00
suspense_tests change: move logging macros into a logging module to avoid name conflicts with log and tracing (#1658) 2023-09-08 07:42:58 -04:00
tailwind change: move logging macros into a logging module to avoid name conflicts with log and tracing (#1658) 2023-09-08 07:42:58 -04:00
tailwind_csr_trunk build(examples): make it easier to run examples (#1697) 2023-09-12 10:46:16 -04:00
timer build(examples): make it easier to run examples (#1697) 2023-09-12 10:46:16 -04:00
todo_app_sqlite refactor(examples): extract client process tasks (#1665) (#1666) 2023-09-08 07:31:55 -04:00
todo_app_sqlite_axum change: move logging macros into a logging module to avoid name conflicts with log and tracing (#1658) 2023-09-08 07:42:58 -04:00
todo_app_sqlite_viz build(examples): make it easier to run examples (#1697) 2023-09-12 10:46:16 -04:00
todomvc build(examples): make it easier to run examples (#1697) 2023-09-12 10:46:16 -04:00
Makefile.toml refactor(examples): extract client process tasks (#1665) (#1666) 2023-09-08 07:31:55 -04:00
README.md build(examples): make it easier to run examples (#1697) 2023-09-12 10:46:16 -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.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
  • Cargo Make
    • Run cargo install --force cargo-make
    • Setup a command alias like alias cm='cargo make' to reduce typing (Optional)
  • Node Version Manager (Optional)
  • Node.js
  • pnpm (Optional)

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)

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