cargo fix
This commit is contained in:
1 parent
98e2b4acbd
commit
4a0869de7b
5 files changed
+9
-67
No files matched your search
@@ -12,7 +12,6 @@ use std::{
|
|||||||
io::Read,
|
io::Read,
|
||||||
panic,
|
panic,
|
||||||
path::PathBuf,
|
path::PathBuf,
|
||||||
process::Command,
|
|
||||||
time::Duration,
|
time::Duration,
|
||||||
};
|
};
|
||||||
use wasm_bindgen_cli_support::Bindgen;
|
use wasm_bindgen_cli_support::Bindgen;
|
||||||
|
|||||||
@@ -1,10 +1,5 @@
|
|||||||
use super::*;
|
use super::*;
|
||||||
use std::{
|
use std::{fs::create_dir_all, io::Write, path::PathBuf};
|
||||||
fs::create_dir_all,
|
|
||||||
io::Write,
|
|
||||||
path::PathBuf,
|
|
||||||
process::{Command, Stdio},
|
|
||||||
};
|
|
||||||
|
|
||||||
/// Run the WASM project on dev-server
|
/// Run the WASM project on dev-server
|
||||||
#[derive(Clone, Debug, Parser)]
|
#[derive(Clone, Debug, Parser)]
|
||||||
|
|||||||
@@ -1,52 +1,25 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
builder,
|
|
||||||
serve::Serve,
|
|
||||||
server::{
|
server::{
|
||||||
output::{print_console_info, PrettierOptions, WebServerInfo},
|
output::{print_console_info, PrettierOptions},
|
||||||
setup_file_watcher, setup_file_watcher_hot_reload,
|
setup_file_watcher, setup_file_watcher_hot_reload,
|
||||||
},
|
},
|
||||||
BuildResult, CrateConfig, Result,
|
BuildResult, CrateConfig, Result,
|
||||||
};
|
};
|
||||||
use axum::{
|
|
||||||
body::{Full, HttpBody},
|
|
||||||
extract::{ws::Message, Extension, TypedHeader, WebSocketUpgrade},
|
|
||||||
http::{
|
|
||||||
header::{HeaderName, HeaderValue},
|
|
||||||
Method, Response, StatusCode,
|
|
||||||
},
|
|
||||||
response::IntoResponse,
|
|
||||||
routing::{get, get_service},
|
|
||||||
Router,
|
|
||||||
};
|
|
||||||
use axum_server::tls_rustls::RustlsConfig;
|
|
||||||
use cargo_metadata::diagnostic::Diagnostic;
|
|
||||||
use dioxus_core::Template;
|
|
||||||
use dioxus_hot_reload::HotReloadMsg;
|
use dioxus_hot_reload::HotReloadMsg;
|
||||||
use dioxus_html::HtmlCtx;
|
use dioxus_html::HtmlCtx;
|
||||||
use dioxus_rsx::hot_reload::*;
|
use dioxus_rsx::hot_reload::*;
|
||||||
use interprocess_docfix::local_socket::LocalSocketListener;
|
use interprocess_docfix::local_socket::LocalSocketListener;
|
||||||
use notify::{RecommendedWatcher, Watcher};
|
|
||||||
use std::{
|
use std::{
|
||||||
net::UdpSocket,
|
|
||||||
path::PathBuf,
|
path::PathBuf,
|
||||||
process::{Child, Command, Stdio},
|
process::{Child, Command},
|
||||||
sync::{Arc, Mutex, RwLock},
|
sync::{Arc, Mutex, RwLock},
|
||||||
};
|
};
|
||||||
use tokio::sync::broadcast::{self, Sender};
|
use tokio::sync::broadcast::{self};
|
||||||
use tower::ServiceBuilder;
|
|
||||||
use tower_http::services::fs::{ServeDir, ServeFileSystemResponseBody};
|
|
||||||
use tower_http::{
|
|
||||||
cors::{Any, CorsLayer},
|
|
||||||
ServiceBuilderExt,
|
|
||||||
};
|
|
||||||
|
|
||||||
#[cfg(feature = "plugin")]
|
#[cfg(feature = "plugin")]
|
||||||
use plugin::PluginManager;
|
use plugin::PluginManager;
|
||||||
|
|
||||||
struct WsReloadState {
|
|
||||||
update: broadcast::Sender<()>,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub async fn startup(config: CrateConfig) -> Result<()> {
|
pub async fn startup(config: CrateConfig) -> Result<()> {
|
||||||
// ctrl-c shutdown checker
|
// ctrl-c shutdown checker
|
||||||
let _crate_config = config.clone();
|
let _crate_config = config.clone();
|
||||||
|
|||||||
@@ -1,37 +1,15 @@
|
|||||||
use crate::{
|
use crate::{BuildResult, CrateConfig, Result};
|
||||||
builder, cfg::Platform, serve::Serve, server::desktop::start_desktop, BuildResult, CrateConfig,
|
|
||||||
Result,
|
|
||||||
};
|
|
||||||
use axum::{
|
|
||||||
body::{Full, HttpBody},
|
|
||||||
extract::{ws::Message, Extension, TypedHeader, WebSocketUpgrade},
|
|
||||||
http::{
|
|
||||||
header::{HeaderName, HeaderValue},
|
|
||||||
Method, Response, StatusCode,
|
|
||||||
},
|
|
||||||
response::IntoResponse,
|
|
||||||
routing::{get, get_service},
|
|
||||||
Router,
|
|
||||||
};
|
|
||||||
use axum_server::tls_rustls::RustlsConfig;
|
|
||||||
use cargo_metadata::diagnostic::Diagnostic;
|
use cargo_metadata::diagnostic::Diagnostic;
|
||||||
use dioxus_core::Template;
|
use dioxus_core::Template;
|
||||||
use dioxus_html::HtmlCtx;
|
use dioxus_html::HtmlCtx;
|
||||||
use dioxus_rsx::hot_reload::*;
|
use dioxus_rsx::hot_reload::*;
|
||||||
use notify::{RecommendedWatcher, Watcher};
|
use notify::{RecommendedWatcher, Watcher};
|
||||||
use std::{
|
use std::{
|
||||||
net::UdpSocket,
|
|
||||||
path::PathBuf,
|
path::PathBuf,
|
||||||
process::{Command, Stdio},
|
|
||||||
sync::{Arc, Mutex},
|
sync::{Arc, Mutex},
|
||||||
};
|
};
|
||||||
use tokio::sync::broadcast::{self, Sender};
|
use tokio::sync::broadcast::Sender;
|
||||||
use tower::ServiceBuilder;
|
|
||||||
use tower_http::services::fs::{ServeDir, ServeFileSystemResponseBody};
|
|
||||||
use tower_http::{
|
|
||||||
cors::{Any, CorsLayer},
|
|
||||||
ServiceBuilderExt,
|
|
||||||
};
|
|
||||||
|
|
||||||
mod output;
|
mod output;
|
||||||
use output::*;
|
use output::*;
|
||||||
|
|||||||
@@ -19,14 +19,11 @@ use axum::{
|
|||||||
Router,
|
Router,
|
||||||
};
|
};
|
||||||
use axum_server::tls_rustls::RustlsConfig;
|
use axum_server::tls_rustls::RustlsConfig;
|
||||||
use cargo_metadata::diagnostic::Diagnostic;
|
|
||||||
use dioxus_core::Template;
|
|
||||||
use dioxus_html::HtmlCtx;
|
use dioxus_html::HtmlCtx;
|
||||||
use dioxus_rsx::hot_reload::*;
|
use dioxus_rsx::hot_reload::*;
|
||||||
use notify::{RecommendedWatcher, Watcher};
|
|
||||||
use std::{
|
use std::{
|
||||||
net::UdpSocket,
|
net::UdpSocket,
|
||||||
path::PathBuf,
|
|
||||||
process::Command,
|
process::Command,
|
||||||
sync::{Arc, Mutex},
|
sync::{Arc, Mutex},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in new issue
Block a user