Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@ Build tool for [Leptos](https://crates.io/crates/leptos):
- `test` command for running tests of the lib and bin packages that makes up the Leptos project.
- `build` build the server and client.
- `end-to-end` command for building, running the server and calling a bash shell hook. The hook would typically launch Playwright or similar.
- `new` command for creating a new project based on templates, using [cargo-generate](https://cargo-generate.github.io/cargo-generate/index.html). Current templates include
- [`https://github.com/leptos-rs/start`](https://github.com/leptos-rs/start): An Actix starter
- [`https://github.com/leptos-rs/start-axum`](https://github.com/leptos-rs/start-axum): An Axum starter
- [`https://github.com/leptos-rs/start-axum-workspace`](https://github.com/leptos-rs/start-axum-workspace): An Axum starter keeping client and server code in separate crates in a workspace
- `new` command for creating a new project based on templates, using [cargo-generate](https://cargo-generate.github.io/cargo-generate/index.html).
- 'no_downloads' feature to allow user management of optional dependencies
<br/>

Expand All @@ -63,7 +60,12 @@ Help:

> `cargo leptos --help`

For setting up your project, have a look at the [examples](https://github.com/leptos-rs/cargo-leptos/tree/main/examples)
For setting up your project, have a look at one of the [templates](https://github.com/orgs/leptos-rs/repositories?q=start) or the [examples](https://github.com/leptos-rs/cargo-leptos/tree/main/examples). You can also use the `cargo leptos new` command to create a new project from a template, see `cargo leptos new --help` for more information.

Current templates include but are not limited to:
- [`https://github.com/leptos-rs/start-actix`](https://github.com/leptos-rs/start-actix): An Actix starter
- [`https://github.com/leptos-rs/start-axum`](https://github.com/leptos-rs/start-axum): An Axum starter
- [`https://github.com/leptos-rs/start-axum-workspace`](https://github.com/leptos-rs/start-axum-workspace): An Axum starter keeping client and server code in separate crates in a workspace

<br/>

Expand Down
10 changes: 7 additions & 3 deletions src/command/new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ use crate::internal_prelude::*;
#[clap(about)]
pub struct NewCommand {
/// Git repository to clone template from. Can be a full URL (like
/// `https://github.com/leptos-rs/start`), or a shortcut for one of our
/// built-in templates: `leptos-rs/start`, `leptos-rs/start-axum`,
/// `leptos-rs/start-axum-workspace`, or `leptos-rs/start-aws`.
/// `https://github.com/leptos-rs/start-actix`), or a shortcut for one of our
/// built-in templates. Recommended shortcuts are:
///
/// `leptos-rs/start-actix`, `leptos-rs/start-axum`,
/// `leptos-rs/start-axum-workspace`, `leptos-rs/start-csr`.
#[clap(short, long, group = "git-arg")]
pub git: Option<String>,

Expand Down Expand Up @@ -96,6 +98,8 @@ fn absolute_git_url(url: Option<String>) -> Option<String> {
}
"start-aws" | "leptos-rs/start-aws" => format_leptos_starter_url("start-aws"),
"start-spin" | "leptos-rs/start-spin" => format_leptos_starter_url("start-spin"),
"start-csr" | "leptos-rs/start-csr" => format_leptos_starter_url("start-csr"),
"start-wasi" | "leptos-rs/start-wasi" => format_leptos_starter_url("start-wasi"),
_ => url,
})
}
Expand Down