Skip to content

Commit 4364d99

Browse files
committed
feat(website): ✨ re-added size optimizations plugin to website
1 parent d5c2d2f commit 4364d99

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

.github/workflows/website.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
with:
2020
fetch-depth: 0
2121
- run: cargo install bonnie wasm-pack
22-
- run: cargo install perseus-cli --version 0.3.0-beta.14
22+
- run: cargo install perseus-cli --version 0.3.0-beta.15
2323
- run: npm install
2424
working-directory: website
2525
- name: Build website

bonnie.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ site.subcommands.serve.desc = "serves the site's exported content"
3535
site.subcommands.tinker.cmd = [
3636
"cd website",
3737
"perseus tinker"
38-
3938
]
4039
site.subcommands.tinker.desc = "runs tinkers on the website"
4140
site.subcommands.build-tailwind.cmd = [
@@ -51,6 +50,7 @@ site.subcommands.build-tailwind.subcommands.prod.desc = "builds a tailwind style
5150
site.subcommands.deploy.cmd = [
5251
"bonnie site build-tailwind prod",
5352
"cd website",
53+
"PERSEUS_BASE_PATH=http://localhost:8080/perseus perseus tinker",
5454
# Point this live version of the CLI at the given example
5555
"PERSEUS_BASE_PATH=http://localhost:8080/perseus perseus deploy -e"
5656

@@ -59,6 +59,7 @@ site.subcommands.deploy.desc = "builds the website for production and finalizes
5959
site.subcommands.deploy-prod.cmd = [
6060
"bonnie site build-tailwind prod",
6161
"cd website",
62+
"PERSEUS_BASE_PATH=http://localhost:8080/perseus perseus tinker",
6263
# Point this live version of the CLI at the given example
6364
"PERSEUS_BASE_PATH=https://arctic-hen7.github.io/perseus perseus deploy -e"
6465
]

website/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ readme = "./README.md"
1313

1414
[dependencies]
1515
# We use the current version of Perseus, not the local one
16-
perseus = { version = "0.3.0-beta.14", features = [ "translator-fluent" ] }
16+
perseus = { version = "0.3.0-beta.15", features = [ "translator-fluent" ] }
1717
sycamore = "0.6"
1818
sycamore-router = "0.6"
1919
serde = "1"
@@ -24,4 +24,4 @@ pulldown-cmark = "0.8"
2424
lazy_static = "1"
2525
web-sys = { version = "0.3", features = [ "Event", "EventTarget" ] }
2626
wasm-bindgen = "0.2"
27-
# perseus-size-opt = "0.1"
27+
perseus-size-opt = "0.1"

website/src/lib.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ mod components;
22
mod error_pages;
33
mod templates;
44

5-
use perseus::define_app;
6-
// use perseus_size_opt::{perseus_size_opt, SizeOpts};
5+
use perseus::{define_app, Plugins};
6+
use perseus_size_opt::{perseus_size_opt, SizeOpts};
77

88
define_app! {
99
templates: [
@@ -15,6 +15,6 @@ define_app! {
1515
locales: {
1616
default: "en-US",
1717
other: []
18-
}
19-
// plugins: Plugins::new().plugin(perseus_size_opt(), SizeOpts::default())
18+
},
19+
plugins: Plugins::new().plugin(perseus_size_opt, SizeOpts::default())
2020
}

0 commit comments

Comments
 (0)