mirror of
https://github.com/DioxusLabs/dioxus
synced 2025-02-17 06:08:26 +00:00
Merge branch 'master' into events-2
This commit is contained in:
commit
9e623d52cb
7 changed files with 20 additions and 10 deletions
|
@ -17,7 +17,15 @@ struct MacroCollector<'a, 'b> {
|
|||
|
||||
impl<'a, 'b> Visit<'b> for MacroCollector<'a, 'b> {
|
||||
fn visit_macro(&mut self, i: &'b Macro) {
|
||||
self.macros.push(i);
|
||||
if let Some("rsx" | "render") = i
|
||||
.path
|
||||
.segments
|
||||
.last()
|
||||
.map(|i| i.ident.to_string())
|
||||
.as_deref()
|
||||
{
|
||||
self.macros.push(i)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "dioxus-cli"
|
||||
version = { workspace = true }
|
||||
version = "0.4.1"
|
||||
authors = ["Jonathan Kelley"]
|
||||
edition = "2021"
|
||||
description = "CLI tool for developing, testing, and publishing Dioxus apps"
|
||||
|
@ -78,7 +78,7 @@ toml_edit = "0.19.11"
|
|||
|
||||
# bundling
|
||||
tauri-bundler = { version = "=1.3.0", features = ["native-tls-vendored"] }
|
||||
tauri-utils = "1.3"
|
||||
tauri-utils = "=1.4.*"
|
||||
|
||||
dioxus-autofmt = { workspace = true }
|
||||
dioxus-check = { workspace = true }
|
||||
|
|
|
@ -22,7 +22,8 @@ pub struct BuildResult {
|
|||
pub elapsed_time: u128,
|
||||
}
|
||||
|
||||
pub fn build(config: &CrateConfig) -> Result<BuildResult> {
|
||||
#[allow(unused)]
|
||||
pub fn build(config: &CrateConfig, quiet: bool) -> Result<BuildResult> {
|
||||
// [1] Build the project with cargo, generating a wasm32-unknown-unknown target (is there a more specific, better target to leverage?)
|
||||
// [2] Generate the appropriate build folders
|
||||
// [3] Wasm-bindgen the .wasm fiile, and move it into the {builddir}/modules/xxxx/xxxx_bg.wasm
|
||||
|
|
|
@ -42,7 +42,7 @@ impl Build {
|
|||
|
||||
match platform {
|
||||
Platform::Web => {
|
||||
crate::builder::build(&crate_config)?;
|
||||
crate::builder::build(&crate_config, true)?;
|
||||
}
|
||||
Platform::Desktop => {
|
||||
crate::builder::build_desktop(&crate_config, false)?;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
pub const DIOXUS_CLI_VERSION: &str = "0.1.5";
|
||||
pub const DIOXUS_CLI_VERSION: &str = "0.4.1";
|
||||
|
||||
pub mod builder;
|
||||
pub mod server;
|
||||
|
|
|
@ -73,7 +73,7 @@ pub async fn serve_default(
|
|||
config: CrateConfig,
|
||||
start_browser: bool,
|
||||
) -> Result<()> {
|
||||
let first_build_result = crate::builder::build(&config)?;
|
||||
let first_build_result = crate::builder::build(&config, true)?;
|
||||
|
||||
log::info!("🚀 Starting development server...");
|
||||
|
||||
|
@ -134,7 +134,7 @@ pub async fn serve_hot_reload(
|
|||
config: CrateConfig,
|
||||
start_browser: bool,
|
||||
) -> Result<()> {
|
||||
let first_build_result = crate::builder::build(&config)?;
|
||||
let first_build_result = crate::builder::build(&config, true)?;
|
||||
|
||||
log::info!("🚀 Starting development server...");
|
||||
|
||||
|
@ -474,7 +474,7 @@ async fn ws_handler(
|
|||
}
|
||||
|
||||
fn build(config: &CrateConfig, reload_tx: &Sender<()>) -> Result<BuildResult> {
|
||||
let result = builder::build(config)?;
|
||||
let result = builder::build(config, true)?;
|
||||
// change the websocket reload state to true;
|
||||
// the page will auto-reload.
|
||||
if config
|
||||
|
|
|
@ -55,7 +55,8 @@ default = ["tokio_runtime", "hot-reload"]
|
|||
tokio_runtime = ["tokio"]
|
||||
fullscreen = ["wry/fullscreen"]
|
||||
transparent = ["wry/transparent"]
|
||||
tray = ["wry/tray"]
|
||||
devtools = ["wry/devtools"]
|
||||
dox = ["wry/dox"]
|
||||
hot-reload = ["dioxus-hot-reload"]
|
||||
|
||||
[dev-dependencies]
|
||||
|
|
Loading…
Add table
Reference in a new issue