examples: include missing examples in CI (#598)

This commit is contained in:
Greg Johnston 2023-02-28 15:33:02 -05:00 committed by GitHub
parent 4b98ece2b4
commit 04eae63e39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 35 additions and 6 deletions

View file

@ -31,12 +31,16 @@ dependencies = [
{ name = "check", path = "examples/counter_without_macros" },
{ name = "check", path = "examples/counters" },
{ name = "check", path = "examples/counters_stable" },
{ 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/login_with_token_csr_only" },
{ name = "check", path = "examples/parent_child" },
{ name = "check", path = "examples/router" },
{ name = "check", path = "examples/ssr_modes" },
{ name = "check", path = "examples/ssr_modes_axum" },
{ name = "check", path = "examples/tailwind" },
{ name = "check", path = "examples/todo_app_sqlite" },
{ name = "check", path = "examples/todo_app_sqlite_axum" },

View file

@ -24,7 +24,6 @@ pub fn App(cx: Scope) -> impl IntoView {
// as strings, if we'd like
<ul>
{move || errors.get()
.0
.into_iter()
.map(|(_, e)| view! { cx, <li>{e.to_string()}</li>})
.collect::<Vec<_>>()

View file

@ -0,0 +1,9 @@
[tasks.build]
command = "cargo"
args = ["+nightly", "build-all-features"]
install_crate = "cargo-all-features"
[tasks.check]
command = "cargo"
args = ["+nightly", "check-all-features"]
install_crate = "cargo-all-features"

View file

@ -0,0 +1,9 @@
[tasks.build]
command = "cargo"
args = ["+nightly", "build-all-features"]
install_crate = "cargo-all-features"
[tasks.check]
command = "cargo"
args = ["+nightly", "check-all-features"]
install_crate = "cargo-all-features"

View file

@ -0,0 +1,9 @@
[tasks.build]
command = "cargo"
args = ["+nightly", "build-all-features"]
install_crate = "cargo-all-features"
[tasks.check]
command = "cargo"
args = ["+nightly", "check-all-features"]
install_crate = "cargo-all-features"

View file

@ -143,7 +143,7 @@ pub fn TodoMVC(cx: Scope) -> impl IntoView {
});
// Callback to add a todo on pressing the `Enter` key, if the field isn't empty
let input_ref = NodeRef::<Input>::new(cx);
let input_ref = create_node_ref::<Input>(cx);
let add_todo = move |ev: web_sys::KeyboardEvent| {
let input = input_ref.get().unwrap();
ev.stop_propagation();
@ -273,8 +273,8 @@ pub fn Todo(cx: Scope, todo: Todo) -> impl IntoView {
let (editing, set_editing) = create_signal(cx, false);
let set_todos = use_context::<WriteSignal<Todos>>(cx).unwrap();
// this will be filled by _ref=input below
let todo_input = NodeRef::<Input>::new(cx);
// this will be filled by node_ref=input below
let todo_input = create_node_ref::<Input>(cx);
let save = move |value: &str| {
let value = value.trim();
@ -294,7 +294,7 @@ pub fn Todo(cx: Scope, todo: Todo) -> impl IntoView {
>
<div class="view">
<input
_ref=todo_input
node_ref=todo_input
class="toggle"
type="checkbox"
prop:checked={move || (todo.completed)()}

View file

@ -39,7 +39,6 @@ cfg_if! {
}
}
use leptos_reactive::Scope;
use smallvec::SmallVec;
use std::{borrow::Cow, cell::RefCell, fmt, hash::Hash, ops::Deref, rc::Rc};
/// The internal representation of the [`Each`] core-component.