Skip to content

Commit

Permalink
feat(website): ✨ re-added size optimizations plugin to website
Browse files Browse the repository at this point in the history
  • Loading branch information
arctic-hen7 committed Oct 30, 2021
1 parent d5c2d2f commit 4364d99
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
fetch-depth: 0
- run: cargo install bonnie wasm-pack
- run: cargo install perseus-cli --version 0.3.0-beta.14
- run: cargo install perseus-cli --version 0.3.0-beta.15
- run: npm install
working-directory: website
- name: Build website
Expand Down
3 changes: 2 additions & 1 deletion bonnie.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ site.subcommands.serve.desc = "serves the site's exported content"
site.subcommands.tinker.cmd = [
"cd website",
"perseus tinker"

]
site.subcommands.tinker.desc = "runs tinkers on the website"
site.subcommands.build-tailwind.cmd = [
Expand All @@ -51,6 +50,7 @@ site.subcommands.build-tailwind.subcommands.prod.desc = "builds a tailwind style
site.subcommands.deploy.cmd = [
"bonnie site build-tailwind prod",
"cd website",
"PERSEUS_BASE_PATH=http://localhost:8080/perseus perseus tinker",
# Point this live version of the CLI at the given example
"PERSEUS_BASE_PATH=http://localhost:8080/perseus perseus deploy -e"

Expand All @@ -59,6 +59,7 @@ site.subcommands.deploy.desc = "builds the website for production and finalizes
site.subcommands.deploy-prod.cmd = [
"bonnie site build-tailwind prod",
"cd website",
"PERSEUS_BASE_PATH=http://localhost:8080/perseus perseus tinker",
# Point this live version of the CLI at the given example
"PERSEUS_BASE_PATH=https://arctic-hen7.github.io/perseus perseus deploy -e"
]
Expand Down
4 changes: 2 additions & 2 deletions website/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ readme = "./README.md"

[dependencies]
# We use the current version of Perseus, not the local one
perseus = { version = "0.3.0-beta.14", features = [ "translator-fluent" ] }
perseus = { version = "0.3.0-beta.15", features = [ "translator-fluent" ] }
sycamore = "0.6"
sycamore-router = "0.6"
serde = "1"
Expand All @@ -24,4 +24,4 @@ pulldown-cmark = "0.8"
lazy_static = "1"
web-sys = { version = "0.3", features = [ "Event", "EventTarget" ] }
wasm-bindgen = "0.2"
# perseus-size-opt = "0.1"
perseus-size-opt = "0.1"
8 changes: 4 additions & 4 deletions website/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ mod components;
mod error_pages;
mod templates;

use perseus::define_app;
// use perseus_size_opt::{perseus_size_opt, SizeOpts};
use perseus::{define_app, Plugins};
use perseus_size_opt::{perseus_size_opt, SizeOpts};

define_app! {
templates: [
Expand All @@ -15,6 +15,6 @@ define_app! {
locales: {
default: "en-US",
other: []
}
// plugins: Plugins::new().plugin(perseus_size_opt(), SizeOpts::default())
},
plugins: Plugins::new().plugin(perseus_size_opt, SizeOpts::default())
}

0 comments on commit 4364d99

Please sign in to comment.