fix formatting
This commit is contained in:
1 parent
99268acc05
commit
e162e3e4cf
4 files changed
+24
-10
No files matched your search
@@ -241,7 +241,7 @@ pub fn build(config: &CrateConfig, quiet: bool, skip_assets: bool) -> Result<Bui
|
||||
}
|
||||
}
|
||||
|
||||
if !skip_assets{
|
||||
if !skip_assets {
|
||||
process_assets(config)?;
|
||||
}
|
||||
|
||||
@@ -251,7 +251,11 @@ pub fn build(config: &CrateConfig, quiet: bool, skip_assets: bool) -> Result<Bui
|
||||
})
|
||||
}
|
||||
|
||||
pub fn build_desktop(config: &CrateConfig, _is_serve: bool, skip_assets: bool) -> Result<BuildResult> {
|
||||
pub fn build_desktop(
|
||||
config: &CrateConfig,
|
||||
_is_serve: bool,
|
||||
skip_assets: bool,
|
||||
) -> Result<BuildResult> {
|
||||
log::info!("🚅 Running build [Desktop] command...");
|
||||
|
||||
let t_start = std::time::Instant::now();
|
||||
@@ -353,7 +357,7 @@ pub fn build_desktop(config: &CrateConfig, _is_serve: bool, skip_assets: bool) -
|
||||
}
|
||||
}
|
||||
|
||||
if !skip_assets{
|
||||
if !skip_assets {
|
||||
// Collect assets
|
||||
process_assets(config)?;
|
||||
// Create the __assets_head.html file for bundling
|
||||
@@ -494,7 +498,7 @@ pub fn gen_page(config: &CrateConfig, serve: bool, skip_assets: bool) -> String
|
||||
{
|
||||
style_str.push_str("<link rel=\"stylesheet\" href=\"tailwind.css\">\n");
|
||||
}
|
||||
if !skip_assets{
|
||||
if !skip_assets {
|
||||
let manifest = config.asset_manifest();
|
||||
style_str.push_str(&manifest.head());
|
||||
}
|
||||
|
||||
@@ -46,8 +46,13 @@ impl Serve {
|
||||
Serve::regen_dev_page(&crate_config, self.serve.skip_assets)?;
|
||||
|
||||
// start the develop server
|
||||
server::web::startup(self.serve.port, crate_config.clone(), self.serve.open, self.serve.skip_assets)
|
||||
.await?;
|
||||
server::web::startup(
|
||||
self.serve.port,
|
||||
crate_config.clone(),
|
||||
self.serve.open,
|
||||
self.serve.skip_assets,
|
||||
)
|
||||
.await?;
|
||||
}
|
||||
cfg::Platform::Desktop => {
|
||||
server::desktop::startup(crate_config.clone(), &serve_cfg).await?;
|
||||
|
||||
@@ -237,7 +237,7 @@ pub(crate) struct DesktopPlatform {
|
||||
}
|
||||
|
||||
impl Platform for DesktopPlatform {
|
||||
fn start(config: &CrateConfig,serve: &ConfigOptsServe) -> Result<Self> {
|
||||
fn start(config: &CrateConfig, serve: &ConfigOptsServe) -> Result<Self> {
|
||||
let (child, first_build_result) = start_desktop(config, serve.skip_assets)?;
|
||||
|
||||
log::info!("🚀 Starting development server...");
|
||||
|
||||
@@ -47,7 +47,12 @@ struct WsReloadState {
|
||||
update: broadcast::Sender<()>,
|
||||
}
|
||||
|
||||
pub async fn startup(port: u16, config: CrateConfig, start_browser: bool, skip_assets: bool) -> Result<()> {
|
||||
pub async fn startup(
|
||||
port: u16,
|
||||
config: CrateConfig,
|
||||
start_browser: bool,
|
||||
skip_assets: bool,
|
||||
) -> Result<()> {
|
||||
// ctrl-c shutdown checker
|
||||
let _crate_config = config.clone();
|
||||
let _ = ctrlc::set_handler(move || {
|
||||
@@ -72,7 +77,7 @@ async fn serve_default(
|
||||
port: u16,
|
||||
config: CrateConfig,
|
||||
start_browser: bool,
|
||||
skip_assets: bool
|
||||
skip_assets: bool,
|
||||
) -> Result<()> {
|
||||
let first_build_result = crate::builder::build(&config, false, skip_assets)?;
|
||||
|
||||
@@ -134,7 +139,7 @@ async fn serve_hot_reload(
|
||||
port: u16,
|
||||
config: CrateConfig,
|
||||
start_browser: bool,
|
||||
skip_assets: bool
|
||||
skip_assets: bool,
|
||||
) -> Result<()> {
|
||||
let first_build_result = crate::builder::build(&config, false, skip_assets)?;
|
||||
|
||||
|
||||
Reference in new issue
Block a user