feat: add init command

This commit is contained in:
mrxiaozhuox committed 2022-01-23 01:29:36 +08:00
1 parent d18a93f129
commit 0e2c05be66
15 files changed
+151 -192

No files matched your search

+15 -3
View File
@@ -8,11 +8,15 @@ async fn main() -> Result<()> {
match args.action {
Commands::Translate(opts) => {
opts.translate()?;
if let Err(e) = opts.translate() {
log::error!("translate error: {}", e);
}
}
Commands::Build(opts) => {
opts.build()?;
if let Err(e) = opts.build() {
log::error!("build error: {}", e);
}
}
// Commands::Clean(_) => {
@@ -23,7 +27,15 @@ async fn main() -> Result<()> {
// //
// }
Commands::Serve(opts) => {
opts.serve().await?;
if let Err(e) = opts.serve().await {
log::error!("serve error: {}", e);
}
}
Commands::Init(opts) => {
if let Err(e) = opts.init() {
log::error!("init error: {}", e);
}
}
}