Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate parsing and core css functionality #10

Merged
merged 22 commits into from
Aug 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
19114e9
sep stylist-core and parsing
WorldSEnder Aug 7, 2021
3c141a1
formatting
WorldSEnder Aug 7, 2021
0138c10
target wasm dependencies
WorldSEnder Aug 7, 2021
87d5daf
rename scopes -> sheet
WorldSEnder Aug 7, 2021
4e44d99
AST follows more closely now the CSS spec v3
WorldSEnder Aug 7, 2021
35663c2
add test cases from documentation
WorldSEnder Aug 7, 2021
6e3d67d
try_from_scopes -> new_from_sheet
WorldSEnder Aug 7, 2021
0ce6566
remove unused Arc
WorldSEnder Aug 8, 2021
da46106
shift clone out of Registry#get
WorldSEnder Aug 8, 2021
8fa22ab
use arch-specific module for internal architecture dependent stuff
WorldSEnder Aug 8, 2021
3bdc8c3
Merge remote-tracking branch 'upstream/master' into stylist
WorldSEnder Aug 8, 2021
bd53eaa
use doc instead of --cfg documenting
WorldSEnder Aug 8, 2021
fb4da59
more documentation
WorldSEnder Aug 8, 2021
ce424bd
revert to using rustdoc-args. cargo test respects doc flags and shoul…
WorldSEnder Aug 8, 2021
148958c
update examples
WorldSEnder Aug 8, 2021
c1232a9
github actions testing examples
WorldSEnder Aug 8, 2021
3651954
move style and registry back into stylist package
WorldSEnder Aug 8, 2021
3c241f1
add back documenting flag
WorldSEnder Aug 8, 2021
f18d5e8
no need for yew to be in dev-deps if style lives in stylist itself
WorldSEnder Aug 8, 2021
3d44e18
Borrow -> AsRef, get rid of TryParseCss for now, use prefix as key again
WorldSEnder Aug 9, 2021
f8b21f6
reorder constructors for better visibility, adjust doc
WorldSEnder Aug 9, 2021
18471ec
add documentation to core ast
WorldSEnder Aug 9, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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