Migrate project to workspace

This commit is contained in:
Leonard Steppy 2025-02-16 17:47:33 +01:00
parent 922573ff65
commit fe9c97bb19
16 changed files with 59 additions and 43 deletions

View File

@ -1,16 +1,6 @@
[package]
name = "jana_sessions_webpage"
version = "0.1.0"
edition = "2021"
[workspace]
resolver = "2"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
default-run = "jana_sessions_webpage"
[dependencies]
chrono = { version = "0.4", features = ["serde"] }
leptos = { version = "0.7", features = ["csr"] }
console_error_panic_hook = "0.1.7"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
clap = { version = "4.5", features = ["derive"] }
members = [
"leptos_webpage",
]

View File

@ -1,32 +1,10 @@
# Jana Sessions Webpage
The webpage for Jana-Sessions (unofficial name), fully written in Rust.
The webpage of Jana Sessions (unofficial name) written in Rust.
## Building
The project currently consists of only a single crate, but a mayor refactoring is planned.
The project currently uses leptos, so you'll want to install trunk (`cargo install trunk`).
For the build to work you'll need the `wasm32-unknown-unknown` target (`rustup target add wasm32-unknown-unknown`).
You can build the projekt with
```bash
trunk build --release
```
which will create the app in the `target/dist` folder.
Alternatively you can serve it locally with
```bash
trunk serve
```
To also access the local hosted page from other devices, use
```bash
trunk serve -a 0.0.0.0
```
## Deployment
Just use pythons webserver and point it to the dist folder
```bash
python3 -m http.server 8080 --directoy target/dist
```
## leptos_webpage
The first functional version of the page, using leptos and trunk.
Please see the README there for more details.

16
leptos_webpage/Cargo.toml Normal file
View File

@ -0,0 +1,16 @@
[package]
name = "jana_sessions_webpage"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
default-run = "jana_sessions_webpage"
[dependencies]
chrono = { version = "0.4", features = ["serde"] }
leptos = { version = "0.7", features = ["csr"] }
console_error_panic_hook = "0.1.7"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
clap = { version = "4.5", features = ["derive"] }

32
leptos_webpage/README.md Normal file
View File

@ -0,0 +1,32 @@
# Jana Sessions Webpage
The webpage for Jana-Sessions (unofficial name), fully written in Rust.
## Building
The project currently uses leptos, so you'll want to install trunk (`cargo install trunk`).
For the build to work you'll need the `wasm32-unknown-unknown` target (`rustup target add wasm32-unknown-unknown`).
You can build the projekt with
```bash
trunk build --release
```
which will create the app in the `target/dist` folder.
Alternatively you can serve it locally with
```bash
trunk serve
```
To also access the local hosted page from other devices, use
```bash
trunk serve -a 0.0.0.0
```
## Deployment
Just use pythons webserver and point it to the dist folder
```bash
python3 -m http.server 8080 --directoy target/dist
```

View File

@ -1,6 +1,6 @@
[build]
filehash = false
dist = "target/dist"
dist = "../target/dist"
public_url = "."
[[hooks]]