Skip to content

Commit

Permalink
Merge pull request #10 from WorldSEnder/stylist
Browse files Browse the repository at this point in the history
Separate parsing and core css functionality
  • Loading branch information
futursolo committed Aug 10, 2021
2 parents 7ff78f8 + 18471ec commit faa7587
Show file tree
Hide file tree
Showing 23 changed files with 763 additions and 635 deletions.
2 changes: 2 additions & 0 deletions .cargo/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[target.wasm32-unknown-unknown]
runner = 'wasm-bindgen-test-runner'
24 changes: 24 additions & 0 deletions .github/workflows/everything.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,30 @@ jobs:
command: test
args: --all-features

- name: Setup trunk
uses: jetli/trunk-action@v0.1.0
with:
version: "latest"

- name: Setup Rust wasm
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
profile: minimal

- name: "Test Example: yew-integration"
working-directory: ./examples/yew-integration
run: trunk build

- name: "Test Example: yew-theme-agent"
working-directory: ./examples/yew-theme-agent
run: trunk build

- name: "Test Example: yew-theme-yewdux"
working-directory: ./examples/yew-theme-yewdux
run: trunk build

publish:
name: Publish to crates.io
runs-on: ubuntu-latest
Expand Down
63 changes: 7 additions & 56 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,57 +1,8 @@
[package]
name = "stylist"
version = "0.7.0"
license = "MIT"
repository = "https://github.com/futursolo/stylist-rs"
authors = [
"Kaede Hoshiakwa <futursolo@icloud.com>",
[workspace]
members = [
"packages/stylist",
"packages/stylist-core",
"examples/yew-integration",
"examples/yew-theme-agent",
"examples/yew-theme-yewdux",
]
edition = "2018"
description = "Stylist is a CSS-in-Rust styling solution for WebAssembly Applications."
keywords = [
"CSS",
"web",
"css-in-rust",
"yew"
]
categories = ["wasm", "web-programming"]
readme = "README.md"
homepage = "https://github.com/futursolo/stylist-rs"


[lib]
crate-type = ["cdylib", "rlib"]

[dependencies]
nom = "6.2.1"
once_cell = "1.8.0"
yew = { version = "0.18.0", optional = true, default-features = false, features = ["web_sys"] }
rand = { version = "0.8.4", features = ["small_rng"] }
thiserror = "1.0"
wasm-bindgen = "0.2.74"

[dev-dependencies]
log = "0.4"
env_logger = "0.9"

[dependencies.web-sys]
version = "0.3.51"
features = [
"Window",
"Document",
"Element",
"HtmlElement",
"HtmlHeadElement",
"HtmlStyleElement",
]

[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.2.3", features = ["js"] }

[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
wasm-bindgen-test = "0.3.24"

[package.metadata.docs.rs]
features = ["yew"]
all-features = true
rustdoc-args = ["--cfg", "documenting"]
2 changes: 1 addition & 1 deletion examples/yew-integration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ edition = "2018"
log = "0.4"
console_log = { version = "0.2.0", features = ["color"] }
yew = {version = "0.18.0"}
stylist = { path = "../..", features = ["yew"] }
stylist = { path = "../../packages/stylist", features = ["yew_integration"] }
2 changes: 1 addition & 1 deletion examples/yew-theme-agent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ log = "0.4.14"
console_log = { version = "0.2.0", features = ["color"] }
yew = "0.18.0"
yewtil = "0.4.0"
stylist = { path = "../..", features = ["yew"] }
stylist = { path = "../../packages/stylist", features = ["yew_integration"] }
4 changes: 2 additions & 2 deletions examples/yew-theme-yewdux/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "yew-theme-agent"
name = "yew-theme-yewdux"
version = "0.1.0"
authors = ["Kaede Hoshikawa <futursolo@icloud.com>"]
edition = "2018"
Expand All @@ -9,5 +9,5 @@ log = "0.4.14"
console_log = { version = "0.2.0", features = ["color"] }
yew = "0.18.0"
yewtil = "0.4.0"
stylist = { path = "../..", features = ["yew"] }
stylist = { path = "../../packages/stylist", features = ["yew_integration"] }
yewdux = "0.6.2"
27 changes: 27 additions & 0 deletions packages/stylist-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[package]
name = "stylist-core"
version = "0.7.0"
license = "MIT"
repository = "https://github.com/futursolo/stylist-rs"
authors = [
"Kaede Hoshiakwa <futursolo@icloud.com>",
"Martin Molzer <ga65guy@mytum.de>",
]
edition = "2018"
description = "Stylist is a CSS-in-Rust styling solution for WebAssembly Applications."
keywords = [
"CSS",
"web",
"css-in-rust",
"yew"
]
categories = ["wasm", "web-programming"]
readme = "README.md"
homepage = "https://github.com/futursolo/stylist-rs"

[dev-dependencies]
log = "0.4"
env_logger = "0.9"

[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
wasm-bindgen-test = "0.3.24"
Loading

0 comments on commit faa7587

Please sign in to comment.