mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 06:44:17 +00:00
build: run tasks from workpace or member directory (#1339)
This commit is contained in:
parent
d1ef5fce9f
commit
3481a6ee53
19 changed files with 82 additions and 93 deletions
|
@ -3,113 +3,25 @@
|
|||
# cargo install --force cargo-make
|
||||
############
|
||||
|
||||
[config]
|
||||
# make tasks run at the workspace root
|
||||
default_to_workspace = false
|
||||
|
||||
[tasks.check]
|
||||
clear = true
|
||||
dependencies = [
|
||||
"check-all",
|
||||
"check-wasm",
|
||||
"check-all-release",
|
||||
"check-wasm-release",
|
||||
]
|
||||
|
||||
[tasks.check-all]
|
||||
command = "cargo"
|
||||
args = ["+nightly", "check-all-features"]
|
||||
install_crate = "cargo-all-features"
|
||||
|
||||
[tasks.check-wasm]
|
||||
clear = true
|
||||
dependencies = [{ name = "check-wasm", path = "leptos" }]
|
||||
|
||||
[tasks.check-all-release]
|
||||
command = "cargo"
|
||||
args = ["+nightly", "check-all-features"]
|
||||
install_crate = "cargo-all-features"
|
||||
|
||||
[tasks.check-wasm-release]
|
||||
clear = true
|
||||
dependencies = [{ name = "check-wasm-release", path = "leptos" }]
|
||||
|
||||
[tasks.check-examples]
|
||||
clear = true
|
||||
dependencies = [
|
||||
{ name = "check", path = "examples/counter" },
|
||||
{ name = "check", path = "examples/counter_isomorphic" },
|
||||
{ name = "check", path = "examples/counters" },
|
||||
{ name = "check", path = "examples/error_boundary" },
|
||||
{ name = "check", path = "examples/errors_axum" },
|
||||
{ name = "check", path = "examples/fetch" },
|
||||
{ name = "check", path = "examples/hackernews" },
|
||||
{ name = "check", path = "examples/hackernews_axum" },
|
||||
{ name = "check", path = "examples/js-framework-benchmark" },
|
||||
{ name = "check", path = "examples/leptos-tailwind-axum" },
|
||||
{ name = "check", path = "examples/login_with_token_csr_only" },
|
||||
{ name = "check", path = "examples/parent_child" },
|
||||
{ name = "check", path = "examples/router" },
|
||||
{ name = "check", path = "examples/session_auth_axum" },
|
||||
{ name = "check", path = "examples/slots" },
|
||||
{ name = "check", path = "examples/ssr_modes" },
|
||||
{ name = "check", path = "examples/ssr_modes_axum" },
|
||||
{ name = "check", path = "examples/tailwind" },
|
||||
{ name = "check", path = "examples/tailwind_csr_trunk" },
|
||||
{ name = "check", path = "examples/timer" },
|
||||
{ name = "check", path = "examples/todo_app_sqlite" },
|
||||
{ name = "check", path = "examples/todo_app_sqlite_axum" },
|
||||
{ name = "check", path = "examples/todo_app_sqlite_viz" },
|
||||
{ name = "check", path = "examples/todomvc" },
|
||||
]
|
||||
[env]
|
||||
CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
|
||||
|
||||
[tasks.check-stable]
|
||||
workspace = false
|
||||
clear = true
|
||||
dependencies = [
|
||||
{ name = "check", path = "examples/counter_without_macros" },
|
||||
{ name = "check", path = "examples/counters_stable" },
|
||||
]
|
||||
|
||||
[tasks.test]
|
||||
clear = true
|
||||
dependencies = [
|
||||
"test-all",
|
||||
"test-leptos_macro-example",
|
||||
"doc-leptos_macro-example",
|
||||
]
|
||||
|
||||
[tasks.test-all]
|
||||
command = "cargo"
|
||||
args = ["+nightly", "test-all-features"]
|
||||
install_crate = "cargo-all-features"
|
||||
|
||||
[tasks.test-leptos_macro-example]
|
||||
description = "Tests the leptos_macro/example to check if macro handles doc comments correctly"
|
||||
command = "cargo"
|
||||
args = ["+nightly", "test", "--doc"]
|
||||
cwd = "leptos_macro/example"
|
||||
install_crate = false
|
||||
|
||||
[tasks.doc-leptos_macro-example]
|
||||
description = "Docs the leptos_macro/example to check if macro handles doc comments correctly"
|
||||
command = "cargo"
|
||||
args = ["+nightly", "doc"]
|
||||
cwd = "leptos_macro/example"
|
||||
install_crate = false
|
||||
|
||||
[tasks.ci-examples]
|
||||
workspace = false
|
||||
cwd = "examples"
|
||||
command = "cargo"
|
||||
args = ["make", "ci-clean"]
|
||||
|
||||
[tasks.clean-examples]
|
||||
workspace = false
|
||||
cwd = "examples"
|
||||
command = "cargo"
|
||||
args = ["make", "clean"]
|
||||
|
||||
[env]
|
||||
RUSTFLAGS = ""
|
||||
LEPTOS_OUTPUT_NAME = "ci" # allows examples to check/build without cargo-leptos
|
||||
|
||||
[env.github-actions]
|
||||
RUSTFLAGS = "-D warnings"
|
||||
|
|
22
cargo-make/main.toml
Normal file
22
cargo-make/main.toml
Normal file
|
@ -0,0 +1,22 @@
|
|||
[env]
|
||||
RUSTFLAGS = ""
|
||||
LEPTOS_OUTPUT_NAME = "ci" # allows examples to check/build without cargo-leptos
|
||||
|
||||
[env.github-actions]
|
||||
RUSTFLAGS = "-D warnings"
|
||||
|
||||
[tasks.check]
|
||||
alias = "check-all"
|
||||
|
||||
[tasks.check-all]
|
||||
command = "cargo"
|
||||
args = ["+nightly", "check-all-features"]
|
||||
install_crate = "cargo-all-features"
|
||||
|
||||
[tasks.test]
|
||||
alias = "test-all"
|
||||
|
||||
[tasks.test-all]
|
||||
command = "cargo"
|
||||
args = ["+nightly", "test-all-features"]
|
||||
install_crate = "cargo-all-features"
|
1
integrations/actix/Makefile.toml
Normal file
1
integrations/actix/Makefile.toml
Normal file
|
@ -0,0 +1 @@
|
|||
extend = { path = "../../cargo-make/main.toml" }
|
1
integrations/axum/Makefile.toml
Normal file
1
integrations/axum/Makefile.toml
Normal file
|
@ -0,0 +1 @@
|
|||
extend = { path = "../../cargo-make/main.toml" }
|
1
integrations/utils/Makefile.toml
Normal file
1
integrations/utils/Makefile.toml
Normal file
|
@ -0,0 +1 @@
|
|||
extend = { path = "../../cargo-make/main.toml" }
|
1
integrations/viz/Makefile.toml
Normal file
1
integrations/viz/Makefile.toml
Normal file
|
@ -0,0 +1 @@
|
|||
extend = { path = "../../cargo-make/main.toml" }
|
|
@ -1,3 +1,14 @@
|
|||
extend = { path = "../cargo-make/main.toml" }
|
||||
|
||||
[tasks.check]
|
||||
clear = true
|
||||
dependencies = [
|
||||
"check-all",
|
||||
"check-wasm",
|
||||
"check-release",
|
||||
"check-wasm-release",
|
||||
]
|
||||
|
||||
[tasks.check-wasm]
|
||||
clear = true
|
||||
dependencies = ["check-hydrate", "check-csr"]
|
||||
|
@ -43,3 +54,7 @@ args = [
|
|||
"--features=csr",
|
||||
"--target=wasm32-unknown-unknown",
|
||||
]
|
||||
|
||||
[tasks.check-release]
|
||||
command = "cargo"
|
||||
args = ["check", "--release"]
|
||||
|
|
1
leptos_config/Makefile.toml
Normal file
1
leptos_config/Makefile.toml
Normal file
|
@ -0,0 +1 @@
|
|||
extend = { path = "../cargo-make/main.toml" }
|
1
leptos_dom/Makefile.toml
Normal file
1
leptos_dom/Makefile.toml
Normal file
|
@ -0,0 +1 @@
|
|||
extend = { path = "../cargo-make/main.toml" }
|
1
leptos_hot_reload/Makefile.toml
Normal file
1
leptos_hot_reload/Makefile.toml
Normal file
|
@ -0,0 +1 @@
|
|||
extend = { path = "../cargo-make/main.toml" }
|
23
leptos_macro/Makefile.toml
Normal file
23
leptos_macro/Makefile.toml
Normal file
|
@ -0,0 +1,23 @@
|
|||
extend = { path = "../cargo-make/main.toml" }
|
||||
|
||||
[tasks.test]
|
||||
clear = true
|
||||
dependencies = [
|
||||
"test-all",
|
||||
"test-leptos_macro-example",
|
||||
"doc-leptos_macro-example",
|
||||
]
|
||||
|
||||
[tasks.test-leptos_macro-example]
|
||||
description = "Tests the leptos_macro/example to check if macro handles doc comments correctly"
|
||||
command = "cargo"
|
||||
args = ["+nightly", "test", "--doc"]
|
||||
cwd = "example"
|
||||
install_crate = false
|
||||
|
||||
[tasks.doc-leptos_macro-example]
|
||||
description = "Docs the leptos_macro/example to check if macro handles doc comments correctly"
|
||||
command = "cargo"
|
||||
args = ["+nightly", "doc"]
|
||||
cwd = "example"
|
||||
install_crate = false
|
|
@ -1553,6 +1553,7 @@ pub(crate) fn component_to_tokens(
|
|||
global_class: Option<&TokenTree>,
|
||||
) -> TokenStream {
|
||||
let name = node.name();
|
||||
#[cfg(debug_assertions)]
|
||||
let component_name = ident_from_tag_name(node.name());
|
||||
let span = node.name().span();
|
||||
|
||||
|
@ -1685,6 +1686,7 @@ pub(crate) fn component_to_tokens(
|
|||
}
|
||||
});
|
||||
|
||||
#[allow(unused_mut)] // used in debug
|
||||
let mut component = quote! {
|
||||
::leptos::component_view(
|
||||
&#name,
|
||||
|
@ -2120,6 +2122,7 @@ impl IdeTagHelper {
|
|||
/// open_tag(open_tag.props().slots().children().build())
|
||||
/// }
|
||||
/// ```
|
||||
#[cfg(debug_assertions)]
|
||||
pub fn add_component_completion(
|
||||
component: &mut TokenStream,
|
||||
node: &NodeElement,
|
||||
|
|
1
leptos_reactive/Makefile.toml
Normal file
1
leptos_reactive/Makefile.toml
Normal file
|
@ -0,0 +1 @@
|
|||
extend = { path = "../cargo-make/main.toml" }
|
1
leptos_server/Makefile.toml
Normal file
1
leptos_server/Makefile.toml
Normal file
|
@ -0,0 +1 @@
|
|||
extend = { path = "../cargo-make/main.toml" }
|
1
meta/Makefile.toml
Normal file
1
meta/Makefile.toml
Normal file
|
@ -0,0 +1 @@
|
|||
extend = { path = "../cargo-make/main.toml" }
|
1
router/Makefile.toml
Normal file
1
router/Makefile.toml
Normal file
|
@ -0,0 +1 @@
|
|||
extend = { path = "../cargo-make/main.toml" }
|
1
server_fn/Makefile.toml
Normal file
1
server_fn/Makefile.toml
Normal file
|
@ -0,0 +1 @@
|
|||
extend = { path = "../cargo-make/main.toml" }
|
1
server_fn/server_fn_macro_default/Makefile.toml
Normal file
1
server_fn/server_fn_macro_default/Makefile.toml
Normal file
|
@ -0,0 +1 @@
|
|||
extend = { path = "../../cargo-make/main.toml" }
|
1
server_fn_macro/Makefile.toml
Normal file
1
server_fn_macro/Makefile.toml
Normal file
|
@ -0,0 +1 @@
|
|||
extend = { path = "../cargo-make/main.toml" }
|
Loading…
Reference in a new issue