Skip to content

Commit e6a3ae7

Browse files
Move top-level crates to packages/<crate> (yewstack#1680)
* Move crates to packages/* * Update Cargo.toml * Update links * Fix pull-request.yml * Update examples Cargo.toml * Update relative paths * Update tests * Fix path
1 parent 3d8ea6b commit e6a3ae7

File tree

271 files changed

+59
-59
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

271 files changed

+59
-59
lines changed

.github/workflows/pull-request.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ jobs:
4545
- name: Run clippy - yew with all features
4646
if: always()
4747
run: |
48-
cd yew
48+
cd packages/yew
4949
cargo clippy --all-targets --features "cbor msgpack toml yaml" -- -D warnings
5050
5151
- name: Run clippy - yew-stdweb with all features
5252
if: always()
5353
run: |
54-
cd yew-stdweb
54+
cd packages/yew-stdweb
5555
cargo clippy --all-targets --features "cbor msgpack toml yaml" -- -D warnings
5656
5757
check_examples:
@@ -116,14 +116,14 @@ jobs:
116116

117117
- name: Run doctest - yew with features
118118
run: |
119-
cd yew
119+
cd packages/yew
120120
cargo test --doc --features "doc_test wasm_test yaml msgpack cbor toml"
121121
122122
- name: Run doctest - yew-stdweb with features
123123
run: |
124124
# Sadly we can't run the tests on yew-stdweb as the snippets use `yew`, not `yew_stdweb` so the imports wouldn't work.
125125
# To fix this we just run them on yew but with yew-stdweb's default features enabled.
126-
cd yew
126+
cd packages/yew
127127
cargo test --doc \
128128
--no-default-features --features "services agent std_web" \
129129
--features "doc_test wasm_test yaml msgpack cbor toml"
@@ -170,7 +170,7 @@ jobs:
170170
env:
171171
HTTPBIN_URL: "http://localhost:8080"
172172
run: |
173-
cd yew
173+
cd packages/yew
174174
# FIXME: Chrome appears to be timing out occasionally
175175
wasm-pack test --firefox --headless -- --features "wasm_test httpbin_test"
176176
@@ -179,13 +179,13 @@ jobs:
179179
env:
180180
HTTPBIN_URL: "http://localhost:8080"
181181
run: |
182-
cd yew-stdweb
182+
cd packages/yew-stdweb
183183
# FIXME: Chrome really doesn't seem to like yew-stdweb
184184
wasm-pack test --firefox --headless -- --features "wasm_test httpbin_test"
185185
186186
- name: Run tests - yew-functional
187187
run: |
188-
cd yew-functional
188+
cd packages/yew-functional
189189
wasm-pack test --chrome --firefox --headless
190190
191191
unit_tests:

CONTRIBUTING.md

+1-1

Cargo.toml

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
[workspace]
22
members = [
3-
"yew",
4-
"yew-components",
5-
"yew-macro",
6-
"yew-validation",
3+
"packages/yew",
4+
"packages/yew-components",
5+
"packages/yew-macro",
6+
"packages/yew-validation",
77

88
# Router
9-
"yew-router",
10-
"yew-router-macro",
11-
"yew-router-route-parser",
9+
"packages/yew-router",
10+
"packages/yew-router-macro",
11+
"packages/yew-router-route-parser",
1212

1313
# Function components
14-
"yew-functional",
15-
"yew-functional-macro",
14+
"packages/yew-functional",
15+
"packages/yew-functional-macro",
1616

1717
# Utilities
18-
"yewtil",
19-
"yewtil-macro",
18+
"packages/yewtil",
19+
"packages/yewtil-macro",
2020

2121
# dsl
22-
"yew-dsl",
22+
"packages/yew-dsl",
2323

2424
# Examples
2525
"examples/boids",

Makefile.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ dependencies = ["core::check-format-flow", "core::clippy-flow"]
5555

5656
[tasks.lint-stdweb]
5757
private = true
58-
cwd = "yew-stdweb"
58+
cwd = "packages/yew-stdweb"
5959
command = "cargo"
6060
args = [
6161
"make",
@@ -155,7 +155,7 @@ args = ["rm", "--force", "${HTTPBIN_CONTAINER_ID}"]
155155
[tasks.tests-stdweb]
156156
private = true
157157
extend = "core::wasm-pack-base"
158-
cwd = "yew-stdweb"
158+
cwd = "packages/yew-stdweb"
159159
args = [
160160
"test",
161161
"@@split(YEW_TEST_FLAGS, )",

docs/getting-started/project-setup.md

+1-1

examples/boids/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ anyhow = "1.0"
1010
getrandom = { version = "0.2", features = ["js"] }
1111
rand = "0.8"
1212
serde = { version = "1.0", features = ["derive"] }
13-
yew = { path = "../../yew" }
13+
yew = { path = "../../packages/yew" }

examples/counter/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ edition = "2018"
66

77
[dependencies]
88
js-sys = "0.3"
9-
yew = { path = "../../yew" }
9+
yew = { path = "../../packages/yew" }

examples/crm/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ edition = "2018"
77
[dependencies]
88
serde = "1"
99
serde_derive = "1"
10-
yew = { path = "../../yew" }
10+
yew = { path = "../../packages/yew" }

examples/dashboard/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ edition = "2018"
88
anyhow = "1"
99
serde = "1"
1010
serde_derive = "1"
11-
yew = { path = "../../yew", features = ["toml"] }
11+
yew = { path = "../../packages/yew", features = ["toml"] }

examples/file_upload/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ edition = "2018"
66

77
[dependencies]
88
js-sys = "0.3"
9-
yew = { path = "../../yew" }
9+
yew = { path = "../../packages/yew" }

examples/futures/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ edition = "2018"
88
pulldown-cmark = { version = "0.8", default-features = false }
99
wasm-bindgen = "0.2"
1010
wasm-bindgen-futures = "0.4"
11-
yew = { path = "../../yew" }
12-
yewtil = { path = "../../yewtil", features = ["future"] }
11+
yew = { path = "../../packages/yew" }
12+
yewtil = { path = "../../packages/yewtil", features = ["future"] }
1313

1414
[dependencies.web-sys]
1515
version = "0.3"

examples/game_of_life/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ getrandom = { version = "0.2", features = ["js"] }
1313
log = "0.4"
1414
rand = "0.8"
1515
wasm-logger = "0.2"
16-
yew = { path = "../../yew" }
16+
yew = { path = "../../packages/yew" }

examples/inner_html/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors = ["Garrett Berg <vitiral@gmail.com>"]
55
edition = "2018"
66

77
[dependencies]
8-
yew = { path = "../../yew" }
8+
yew = { path = "../../packages/yew" }
99

1010
[dependencies.web-sys]
1111
version = "0.3"

examples/js_callback/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ edition = "2018"
66

77
[dependencies]
88
wasm-bindgen = "0.2"
9-
yew = { path = "../../yew" }
9+
yew = { path = "../../packages/yew" }

examples/keyed_list/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ instant = { version = "0.1", features = ["wasm-bindgen"] }
1111
log = "0.4"
1212
rand = "0.8"
1313
wasm-logger = "0.2"
14-
yew = { path = "../../yew" }
15-
yewtil = { path = "../../yewtil" }
14+
yew = { path = "../../packages/yew" }
15+
yewtil = { path = "../../packages/yewtil" }

examples/mount_point/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ edition = "2018"
66

77
[dependencies]
88
wasm-bindgen = "0.2"
9-
yew = { path = "../../yew" }
9+
yew = { path = "../../packages/yew" }
1010

1111
[dependencies.web-sys]
1212
version = "0.3"

examples/multi_thread/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ edition = "2018"
88
log = "0.4"
99
serde = { version = "1.0", features = ["derive"] }
1010
wasm-logger = "0.2"
11-
yew = { path = "../../yew" }
11+
yew = { path = "../../packages/yew" }

examples/nested_list/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ edition = "2018"
77
[dependencies]
88
log = "0.4"
99
wasm-logger = "0.2"
10-
yew = { path = "../../yew" }
10+
yew = { path = "../../packages/yew" }

examples/node_refs/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ authors = ["Justin Starry <justin.starry@icloud.com>"]
55
edition = "2018"
66

77
[dependencies]
8-
yew = { path = "../../yew" }
8+
yew = { path = "../../packages/yew" }
99
web-sys = { version = "0.3", features = ["HtmlElement", "HtmlInputElement", "Node"] }

examples/pub_sub/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ edition = "2018"
77
log = "0.4"
88
serde = { version = "1.0", features = ["derive"] }
99
wasm-logger = "0.2.0"
10-
yew = { path = "../../yew" }
10+
yew = { path = "../../packages/yew" }

examples/router/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ log = "0.4"
1010
getrandom = { version = "0.2", features = ["js"] }
1111
rand = { version = "0.7", features = ["small_rng"] }
1212
wasm-logger = "0.2"
13-
yew = { path = "../../yew" }
14-
yew-router = { path = "../../yew-router" }
15-
yewtil = { path = "../../yewtil" }
13+
yew = { path = "../../packages/yew" }
14+
yew-router = { path = "../../packages/yew-router" }
15+
yewtil = { path = "../../packages/yewtil" }

examples/store/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ authors = ["Michał Kawalec <michal@monad.cat>"]
55
edition = "2018"
66

77
[dependencies]
8-
yew = { path = "../../yew" }
9-
yewtil = { path = "../../yewtil" }
8+
yew = { path = "../../packages/yew" }
9+
yewtil = { path = "../../packages/yewtil" }

examples/timer/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ authors = ["Denis Kolodin <deniskolodin@gmail.com>"]
55
edition = "2018"
66

77
[dependencies]
8-
yew = { path = "../../yew" }
8+
yew = { path = "../../packages/yew" }
99
js-sys = "0.3"

examples/todomvc/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ strum = "0.20"
99
strum_macros = "0.20"
1010
serde = "1"
1111
serde_derive = "1"
12-
yew = { path = "../../yew" }
12+
yew = { path = "../../packages/yew" }

examples/two_apps/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ authors = ["Denis Kolodin <deniskolodin@gmail.com>"]
55
edition = "2018"
66

77
[dependencies]
8-
yew = { path = "../../yew" }
8+
yew = { path = "../../packages/yew" }

examples/webgl/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = "2018"
77
[dependencies]
88
js-sys = "0.3"
99
wasm-bindgen = "0.2"
10-
yew = { path = "../../yew" }
10+
yew = { path = "../../packages/yew" }
1111

1212
[dependencies.web-sys]
1313
version = "0.3"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

yew-macro/tests/html_macro/html-block-fail.stderr packages/yew-macro/tests/html_macro/html-block-fail.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ error[E0277]: `()` doesn't implement `std::fmt::Display`
3434
15 | <>{ for (0..3).map(|_| not_tree()) }</>
3535
| ^^^^^^ `()` cannot be formatted with the default formatter
3636
|
37-
::: $WORKSPACE/yew/src/utils.rs:76:8
37+
::: $WORKSPACE/packages/yew/src/utils.rs
3838
|
39-
76 | T: Into<R>,
39+
| T: Into<R>,
4040
| ------- required by this bound in `yew::utils::into_node_iter`
4141
|
4242
= help: the trait `std::fmt::Display` is not implemented for `()`

yew-macro/tests/html_macro/html-iterable-fail.stderr packages/yew-macro/tests/html_macro/html-iterable-fail.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ error[E0277]: `()` is not an iterator
7171
18 | { for () }
7272
| ^^ `()` is not an iterator
7373
|
74-
::: $WORKSPACE/yew/src/utils.rs:75:9
74+
::: $WORKSPACE/packages/yew/src/utils.rs
7575
|
76-
75 | IT: IntoIterator<Item = T>,
76+
| IT: IntoIterator<Item = T>,
7777
| ---------------------- required by this bound in `yew::utils::into_node_iter`
7878
|
7979
= help: the trait `std::iter::Iterator` is not implemented for `()`
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

yew/build.rs packages/yew/build.rs

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

yewtil/README.md packages/yewtil/README.md

+3-3
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

website/translated_docs/ja/getting-started/project-setup.md

+1-1

website/translated_docs/ja/version-0.17.3/getting-started/project-setup.md

+1-1

website/versioned_docs/version-0.17.3/getting-started/project-setup.md

+1-1

0 commit comments

Comments
 (0)