Move top-level crates to packages/<crate> (#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
This commit is contained in:
Philip Peterson 2021-01-11 22:32:48 -05:00 committed by GitHub
parent 3d8ea6b716
commit e6a3ae7301
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
271 changed files with 59 additions and 59 deletions

View File

@ -45,13 +45,13 @@ jobs:
- name: Run clippy - yew with all features
if: always()
run: |
cd yew
cd packages/yew
cargo clippy --all-targets --features "cbor msgpack toml yaml" -- -D warnings
- name: Run clippy - yew-stdweb with all features
if: always()
run: |
cd yew-stdweb
cd packages/yew-stdweb
cargo clippy --all-targets --features "cbor msgpack toml yaml" -- -D warnings
check_examples:
@ -116,14 +116,14 @@ jobs:
- name: Run doctest - yew with features
run: |
cd yew
cd packages/yew
cargo test --doc --features "doc_test wasm_test yaml msgpack cbor toml"
- name: Run doctest - yew-stdweb with features
run: |
# Sadly we can't run the tests on yew-stdweb as the snippets use `yew`, not `yew_stdweb` so the imports wouldn't work.
# To fix this we just run them on yew but with yew-stdweb's default features enabled.
cd yew
cd packages/yew
cargo test --doc \
--no-default-features --features "services agent std_web" \
--features "doc_test wasm_test yaml msgpack cbor toml"
@ -170,7 +170,7 @@ jobs:
env:
HTTPBIN_URL: "http://localhost:8080"
run: |
cd yew
cd packages/yew
# FIXME: Chrome appears to be timing out occasionally
wasm-pack test --firefox --headless -- --features "wasm_test httpbin_test"
@ -179,13 +179,13 @@ jobs:
env:
HTTPBIN_URL: "http://localhost:8080"
run: |
cd yew-stdweb
cd packages/yew-stdweb
# FIXME: Chrome really doesn't seem to like yew-stdweb
wasm-pack test --firefox --headless -- --features "wasm_test httpbin_test"
- name: Run tests - yew-functional
run: |
cd yew-functional
cd packages/yew-functional
wasm-pack test --chrome --firefox --headless
unit_tests:

View File

@ -60,7 +60,7 @@ Please note that the public httpbin instance can't be used for these tests.
### Macro tests
When adding or updating tests, please make sure to update the appropriate `stderr` file, which you can find [here](https://github.com/yewstack/yew/tree/master/yew-macro/tests/macro) for the `html!` macro.
When adding or updating tests, please make sure to update the appropriate `stderr` file, which you can find [here](https://github.com/yewstack/yew/tree/master/packages/yew-macro/tests/macro) for the `html!` macro.
These files ensure that macro compilation errors are correct and easy to understand.
These errors can change with each release of the compiler so they should be generated with the MSRV (currently 1.45).

View File

@ -1,25 +1,25 @@
[workspace]
members = [
"yew",
"yew-components",
"yew-macro",
"yew-validation",
"packages/yew",
"packages/yew-components",
"packages/yew-macro",
"packages/yew-validation",
# Router
"yew-router",
"yew-router-macro",
"yew-router-route-parser",
"packages/yew-router",
"packages/yew-router-macro",
"packages/yew-router-route-parser",
# Function components
"yew-functional",
"yew-functional-macro",
"packages/yew-functional",
"packages/yew-functional-macro",
# Utilities
"yewtil",
"yewtil-macro",
"packages/yewtil",
"packages/yewtil-macro",
# dsl
"yew-dsl",
"packages/yew-dsl",
# Examples
"examples/boids",

View File

@ -55,7 +55,7 @@ dependencies = ["core::check-format-flow", "core::clippy-flow"]
[tasks.lint-stdweb]
private = true
cwd = "yew-stdweb"
cwd = "packages/yew-stdweb"
command = "cargo"
args = [
"make",
@ -155,7 +155,7 @@ args = ["rm", "--force", "${HTTPBIN_CONTAINER_ID}"]
[tasks.tests-stdweb]
private = true
extend = "core::wasm-pack-base"
cwd = "yew-stdweb"
cwd = "packages/yew-stdweb"
args = [
"test",
"@@split(YEW_TEST_FLAGS, )",

View File

@ -62,4 +62,4 @@ This was the best preferred tool to use before the creation of `wasm-bindgen`.
| Supported Targets | <ul><li><code>wasm32-unknown-unknown</code></li></ul> | <ul><li><code>wasm32-unknown-unknown</code></li></ul> | <ul> <li><code>wasm32-unknown-unknown</code></li> <li><code>wasm32-unknown-emscripten</code></li> <li><code>asmjs-unknown-emscripten</code></li> </ul> |
| `web-sys` | Compatible | Compatible | Incompatible |
| `stdweb` | Incompatible | Compatible | Compatible |
| Example Usage | [Sample app](./build-a-sample-app.md) | [Starter template](https://github.com/yewstack/yew-wasm-pack-minimal) | [Build script](https://www.github.com/yewstack/yew/tree/master/yew-stdweb/examples) for `yew-stdweb` examples |
| Example Usage | [Sample app](./build-a-sample-app.md) | [Starter template](https://github.com/yewstack/yew-wasm-pack-minimal) | [Build script](https://www.github.com/yewstack/yew/tree/master/packages/yew-stdweb/examples) for `yew-stdweb` examples |

View File

@ -10,4 +10,4 @@ anyhow = "1.0"
getrandom = { version = "0.2", features = ["js"] }
rand = "0.8"
serde = { version = "1.0", features = ["derive"] }
yew = { path = "../../yew" }
yew = { path = "../../packages/yew" }

View File

@ -6,4 +6,4 @@ edition = "2018"
[dependencies]
js-sys = "0.3"
yew = { path = "../../yew" }
yew = { path = "../../packages/yew" }

View File

@ -7,4 +7,4 @@ edition = "2018"
[dependencies]
serde = "1"
serde_derive = "1"
yew = { path = "../../yew" }
yew = { path = "../../packages/yew" }

View File

@ -8,4 +8,4 @@ edition = "2018"
anyhow = "1"
serde = "1"
serde_derive = "1"
yew = { path = "../../yew", features = ["toml"] }
yew = { path = "../../packages/yew", features = ["toml"] }

View File

@ -6,4 +6,4 @@ edition = "2018"
[dependencies]
js-sys = "0.3"
yew = { path = "../../yew" }
yew = { path = "../../packages/yew" }

View File

@ -8,8 +8,8 @@ edition = "2018"
pulldown-cmark = { version = "0.8", default-features = false }
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
yew = { path = "../../yew" }
yewtil = { path = "../../yewtil", features = ["future"] }
yew = { path = "../../packages/yew" }
yewtil = { path = "../../packages/yewtil", features = ["future"] }
[dependencies.web-sys]
version = "0.3"

View File

@ -13,4 +13,4 @@ getrandom = { version = "0.2", features = ["js"] }
log = "0.4"
rand = "0.8"
wasm-logger = "0.2"
yew = { path = "../../yew" }
yew = { path = "../../packages/yew" }

View File

@ -5,7 +5,7 @@ authors = ["Garrett Berg <vitiral@gmail.com>"]
edition = "2018"
[dependencies]
yew = { path = "../../yew" }
yew = { path = "../../packages/yew" }
[dependencies.web-sys]
version = "0.3"

View File

@ -6,4 +6,4 @@ edition = "2018"
[dependencies]
wasm-bindgen = "0.2"
yew = { path = "../../yew" }
yew = { path = "../../packages/yew" }

View File

@ -11,5 +11,5 @@ instant = { version = "0.1", features = ["wasm-bindgen"] }
log = "0.4"
rand = "0.8"
wasm-logger = "0.2"
yew = { path = "../../yew" }
yewtil = { path = "../../yewtil" }
yew = { path = "../../packages/yew" }
yewtil = { path = "../../packages/yewtil" }

View File

@ -6,7 +6,7 @@ edition = "2018"
[dependencies]
wasm-bindgen = "0.2"
yew = { path = "../../yew" }
yew = { path = "../../packages/yew" }
[dependencies.web-sys]
version = "0.3"

View File

@ -8,4 +8,4 @@ edition = "2018"
log = "0.4"
serde = { version = "1.0", features = ["derive"] }
wasm-logger = "0.2"
yew = { path = "../../yew" }
yew = { path = "../../packages/yew" }

View File

@ -7,4 +7,4 @@ edition = "2018"
[dependencies]
log = "0.4"
wasm-logger = "0.2"
yew = { path = "../../yew" }
yew = { path = "../../packages/yew" }

View File

@ -5,5 +5,5 @@ authors = ["Justin Starry <justin.starry@icloud.com>"]
edition = "2018"
[dependencies]
yew = { path = "../../yew" }
yew = { path = "../../packages/yew" }
web-sys = { version = "0.3", features = ["HtmlElement", "HtmlInputElement", "Node"] }

View File

@ -7,4 +7,4 @@ edition = "2018"
log = "0.4"
serde = { version = "1.0", features = ["derive"] }
wasm-logger = "0.2.0"
yew = { path = "../../yew" }
yew = { path = "../../packages/yew" }

View File

@ -10,6 +10,6 @@ log = "0.4"
getrandom = { version = "0.2", features = ["js"] }
rand = { version = "0.7", features = ["small_rng"] }
wasm-logger = "0.2"
yew = { path = "../../yew" }
yew-router = { path = "../../yew-router" }
yewtil = { path = "../../yewtil" }
yew = { path = "../../packages/yew" }
yew-router = { path = "../../packages/yew-router" }
yewtil = { path = "../../packages/yewtil" }

View File

@ -5,5 +5,5 @@ authors = ["Michał Kawalec <michal@monad.cat>"]
edition = "2018"
[dependencies]
yew = { path = "../../yew" }
yewtil = { path = "../../yewtil" }
yew = { path = "../../packages/yew" }
yewtil = { path = "../../packages/yewtil" }

View File

@ -5,5 +5,5 @@ authors = ["Denis Kolodin <deniskolodin@gmail.com>"]
edition = "2018"
[dependencies]
yew = { path = "../../yew" }
yew = { path = "../../packages/yew" }
js-sys = "0.3"

View File

@ -9,4 +9,4 @@ strum = "0.20"
strum_macros = "0.20"
serde = "1"
serde_derive = "1"
yew = { path = "../../yew" }
yew = { path = "../../packages/yew" }

View File

@ -5,4 +5,4 @@ authors = ["Denis Kolodin <deniskolodin@gmail.com>"]
edition = "2018"
[dependencies]
yew = { path = "../../yew" }
yew = { path = "../../packages/yew" }

View File

@ -7,7 +7,7 @@ edition = "2018"
[dependencies]
js-sys = "0.3"
wasm-bindgen = "0.2"
yew = { path = "../../yew" }
yew = { path = "../../packages/yew" }
[dependencies.web-sys]
version = "0.3"

Some files were not shown because too many files have changed in this diff Show More