Crates.io | create-leptos-csr-tw |
lib.rs | create-leptos-csr-tw |
version | 0.2.2 |
source | src |
created_at | 2023-10-20 22:44:53.256276 |
updated_at | 2023-12-25 22:17:37.234605 |
description | A CLI for setting up a client-side Leptos web application with TailwindCSS. |
homepage | |
repository | https://github.com/friendlymatthew/create-leptos-csr |
max_upload_size | |
id | 1009501 |
size | 41,262 |
Generate a client-side rendered leptos application with one command.
Install create-leptos-csr
globally using:
cargo install create-leptos-csr-tw
This command installs the necessary binary, making it accessible from your command line.
To initiate a new Leptos project, run:
create-leptos-csr-tw
/public
that trunk recognizesvercel
config file to for deployment routing.Leptos-use
, a collection of Leptos utilitiesCreating a client-side rendered Leptos application usually requires starting from scratch, involving multiple steps and potential hurdles.
Something like:
cargo init <project>
cargo add leptos --features=csr,nightly
cd <project>
touch index.html
... # more work here
touch input.css
npx tailwindcss init
... # setting up your tailwind...
mkdir public
(modify `index.html`)
... # adding the same boilerplate to your index.html
trunk serve --open
This crate aims to reduce all the hair pulling that a beginner would face when setting up a leptos application. For experienced developers, this crate saves you time by setting up the necessary stuff.
If you're just starting out, this is great starting point since you can use this template while reading the Leptos book.
app.rs
Contributions are warmly welcomed and greatly appreciated. I'd love to see other templates that use different styling libraries or deployment services.