Skip to content

Commit

Permalink
added nape-portal project and upgrade all nape dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
BillBensing committed Jan 20, 2025
1 parent 9e6fe45 commit 430b8d5
Show file tree
Hide file tree
Showing 10 changed files with 90 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

# Other root-level ignore rules
# ...
dist/
.idea/
debug/
target/
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[workspace]
resolver = "2"
members = [
"apps/nape-cli",
"apps/nape-cli", "apps/nape-portal",
"domain",
"kernel",
"test_framework/assertions",
Expand Down
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,15 @@ test-domain:
test-kernel:
@echo "\n\033[1;96m Running Tests - Kernel Package Only \033[0m\n"
RUSTFLAGS="-A dead_code -A unused_imports" cargo test -p nape_kernel --lib -- --test-threads=8


# Serve rule (generic)
.PHONY: % serve
% serve:
@echo "Serving $(@: serve=)"
$(MAKE) -C $(@: serve=) serve

.PHONY: % fmt
% fmt:
@echo "Serving $(@: fmt=)"
$(MAKE) -C $(@: fmt=) fmt
6 changes: 3 additions & 3 deletions apps/nape-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ path = "src/main.rs"
[dependencies]
nape_domain = { path = "../../domain" }
nape_kernel = { path = "../../kernel" }
clap = { version = "4.5.16", features = ["derive", "cargo"] }
clap = { version = "4.5.26", features = ["derive", "cargo"] }
git2 = "0.18.3"
reqwest = { version = "0.11.27", features = ["json"] }
serde = { version = "1.0.209", features = ["derive"] }
serde_json = "1.0.127"
serde = { version = "1.0.217", features = ["derive"] }
serde_json = "1.0.137"
serde_yaml = "0.9.34"
sha2 = "0.10.8"
hex = "0.4.3"
Expand Down
21 changes: 21 additions & 0 deletions apps/nape-portal/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[package]
name = "nape-portal"
version = "0.1.0"
edition = "2021"

[dependencies]
console_error_panic_hook = "0.1.7"
leptos = { version = "0.7.4", features = ["csr"] }
leptos_router = { version = "0.7.4"}
reactive_stores = "0.1.3"
send_wrapper = { version = "0.6", features = ["futures"] }

[dev-dependencies]
clippy = "*"


[tool.clippy]
deny = ["clippy::unwrap_used"]

[tool.clippy.overrides.tests]
allow = ["clippy::unwrap_used"]
21 changes: 21 additions & 0 deletions apps/nape-portal/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.PHONY: build-release clean fmt serve update-deps upgrade-deps

build-release:
trunk build --release

clean:
trunk clean
cago cleam

fmt:
leptosfmt ./**/*.rs
cargo clippy

serve:
trunk serve

update-deps:
cargo update --verbose

upgrade-deps:
cargo upgrade --verbose
6 changes: 6 additions & 0 deletions apps/nape-portal/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!DOCTYPE html>
<html>
<head> </head>

<body> </body>
</html>
12 changes: 12 additions & 0 deletions apps/nape-portal/src/app.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
use leptos::{component, view, IntoView};
use leptos::prelude::ElementChild;

#[component]
pub fn App() -> impl IntoView {

view! {
<h1>NAPE Portal</h1>
<p> Hello world, welcome to the NAPE Portal! </p>
}

}
11 changes: 11 additions & 0 deletions apps/nape-portal/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
use leptos::mount::mount_to_body;
use crate::app::App;

mod app;

fn main() {
#[cfg(debug_assertions)]
console_error_panic_hook::set_once();

mount_to_body(App);
}
4 changes: 2 additions & 2 deletions kernel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
url = "2.5.2"
log = "0.4.22"
url = "2.5.4"
log = "0.4.25"

[dev-dependencies]
nape_testing_tags = { path = "../test_framework/tags" }
Expand Down

0 comments on commit 430b8d5

Please sign in to comment.