diff --git a/Cargo.lock b/Cargo.lock index 9d30dab..5d00334 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -798,7 +798,7 @@ checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "salvo-cli" -version = "0.1.15" +version = "0.1.16" dependencies = [ "ansi_term", "anyhow", diff --git a/Cargo.toml b/Cargo.toml index 84c1733..31186f2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "salvo-cli" -version = "0.1.15" +version = "0.1.16" edition = "2021" authors = ["Fankai Liu liufankai137@outlook.com"] keywords = ["salvo", "cli","template"] diff --git a/README.md b/README.md index a0b1ec1..b56cc72 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,21 @@
-

Savlo - - build status - -crates.io -Download -License -

+ Savlo +
+
+ + build status + + + crates.io + + + Download + + License
## Introduction + Salvo CLI is a command-line interface tool for the [Salvo](https://github.com/salvo-rs/salvo) web framework. It helps streamline the process of setting up a new Salvo project by generating a template structure. ## Installation @@ -17,29 +23,36 @@ Salvo CLI is a command-line interface tool for the [Salvo](https://github.com/sa ```bash cargo install salvo-cli ``` + ## Usage + To create a new Salvo project, use the new command followed by the name of your project: ```bash salvo-cli new project_name ``` + ## Update + ```bashs cargo install --force salvo-cli ``` ### Feature Development Plan -| Status |Plan | -|:---:|:---:| -|✅| web api template | -|✅| web site template | -|✅|Template with SQLx, SeaORM, Diesel, Rbatis (support for SQLite, PostgreSQL, MySQL)| -|✅|Basic middleware | -|⏳|More middleware| -|⏳|Support for MongoDB| +| Status | Plan | +| :----: | :--------------------------------------------------------------------------------: | +| ✅ | web api template | +| ✅ | web site template | +| ✅ | Template with SQLx, SeaORM, Diesel, Rbatis (support for SQLite, PostgreSQL, MySQL) | +| ✅ | Basic middleware | +| ⏳ | More middleware | +| ⏳ | Support for MongoDB | + ## License + This project is licensed under the MIT OR Apache-2.0 License. ## Contributing + Contributions are welcome! Please feel free to submit a Pull Request. diff --git a/src/utils/create_project.rs b/src/utils/create_project.rs index 1fe0fbc..e57155f 100644 --- a/src/utils/create_project.rs +++ b/src/utils/create_project.rs @@ -49,34 +49,32 @@ fn after_print_info(project_name: &String, config: UserSelected) { match config.db_conn_type { DbConnectionType::Sqlx => { success(t!("create_success_sqlx").replace(r"\n", "\n")); - match config.db_type - { + match config.db_type { DbType::Sqlite => { success(t!("create_success_sqlx_sqlite").replace(r"\n", "\n")); - }, - _=>{ - success(t!("create_success_mysql_or_pgsql").replace(r"\n", "\n")); + } + _ => { + success(t!("create_success_mysql_or_pgsql").replace(r"\n", "\n")); } } } DbConnectionType::SeaOrm => { success(t!("create_success_sea_orm").replace(r"\n", "\n")); - match config.db_type - { + match config.db_type { DbType::Sqlite => { success(t!("create_success_sqlx_sqlite").replace(r"\n", "\n")); - }, - _=>{ - success(t!("create_success_mysql_or_pgsql").replace(r"\n", "\n")); + } + _ => { + success(t!("create_success_mysql_or_pgsql").replace(r"\n", "\n")); } } } DbConnectionType::Diesel => match config.db_type { DbType::Sqlite => { success(t!("create_success_sqlx_diesel").replace(r"\n", "\n")); - }, - _=>{ - success(t!("create_success_mysql_or_pgsql").replace(r"\n", "\n")); + } + _ => { + success(t!("create_success_mysql_or_pgsql").replace(r"\n", "\n")); } }, DbConnectionType::Rbatis => match config.db_type {