Skip to content

Commit

Permalink
update version
Browse files Browse the repository at this point in the history
  • Loading branch information
fankaiLiu committed Nov 17, 2023
1 parent 0f426ff commit 41123df
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "salvo-cli"
version = "0.1.22"
version = "0.1.23"
edition = "2021"
authors = ["Fankai Liu [email protected]","mrxiaozhuox [email protected]"]
keywords = ["salvo", "cli","template"]
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use i18n::set_locale;
mod i18n;
rust_i18n::i18n!("locales", fallback = "en");
#[derive(Parser, Debug)]
#[clap(version = "0.1.22", author = "Fankai liu <[email protected]>")]
#[clap(version = "0.1.23", author = "Fankai liu <[email protected]>")]
struct Opts {
#[clap(subcommand)]
subcmd: SubCommand,
Expand Down
10 changes: 5 additions & 5 deletions src/utils/create_project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ fn write_project_file(

let (src_path, router_path) = create_basic_file(project_path, &handlebars, &data)?;


if is_web_site {
//templates
let template_path = project_path.join("templates");
Expand All @@ -205,7 +204,6 @@ fn write_project_file(
let assets_path = project_path.join("assets");
std::fs::create_dir_all(&assets_path)?;


//assets/favicon.ico
let favicon_bytes = include_bytes!("../template/assets/favicon.ico");
let mut favicon_file = File::create(assets_path.join("favicon.ico"))?;
Expand Down Expand Up @@ -267,8 +265,10 @@ fn write_project_file(
router_user_file.write_all(router_user_rendered.as_bytes())?;

//src/router/static_routers.rs
let router_static_routers_template = include_str!("../template/src/routers/static_routers.hbs");
let router_static_routers_rendered = handlebars.render_template(router_static_routers_template, &data)?;
let router_static_routers_template =
include_str!("../template/src/routers/static_routers.hbs");
let router_static_routers_rendered =
handlebars.render_template(router_static_routers_template, &data)?;
let mut router_static_routers_file = File::create(router_path.join("static_routers.rs"))?;
router_static_routers_file.write_all(router_static_routers_rendered.as_bytes())?;

Expand All @@ -285,7 +285,7 @@ fn write_project_file(
let services_user_rendered = handlebars.render_template(services_user_template, &data)?;
let mut services_user_file = File::create(services_path.join("user.rs"))?;
services_user_file.write_all(services_user_rendered.as_bytes())?;

//src/utils
let utils_path = src_path.join("utils");
std::fs::create_dir_all(&utils_path)?;
Expand Down

0 comments on commit 41123df

Please sign in to comment.