Skip to content

Commit e0c888f

Browse files
committed
Merge remote-tracking branch 'upstream/master' into feature/opt-keyed-diff
2 parents 0c8a271 + 7e6d6c4 commit e0c888f

File tree

307 files changed

+7293
-6692
lines changed

Some content is hidden

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

307 files changed

+7293
-6692
lines changed

.firebaserc

+12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
{
22
"projects": {
33
"default": "yew-rs"
4+
},
5+
"targets": {
6+
"yew-rs": {
7+
"hosting": {
8+
"website": [
9+
"yew-rs"
10+
],
11+
"examples": [
12+
"yew-rs-examples"
13+
]
14+
}
15+
}
416
}
517
}

.github/workflows/autopublish.yml

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
name: Publish website
22
on:
33
push:
4-
branches:
5-
- master
4+
branches: [master]
65
paths:
76
- "docs/**/*"
87
- "website/**/*"
@@ -16,13 +15,16 @@ jobs:
1615
uses: actions/setup-node@v1
1716
with:
1817
node-version: "12.x"
19-
- name: Install dependencies
20-
run: cd website && yarn install && cd ../
21-
- name: Build site
22-
run: cd website && yarn run build && cd ../
18+
19+
- name: Build
20+
run: |
21+
cd website
22+
yarn install
23+
yarn run build
24+
2325
- name: Deploy to Firebase
2426
uses: w9jds/firebase-action@master
2527
with:
26-
args: deploy --only hosting
28+
args: deploy --only hosting:website
2729
env:
2830
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}

.github/workflows/doctests.yml

-16
This file was deleted.
+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Publish Examples
2+
on:
3+
push:
4+
branches: [master]
5+
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
env:
10+
# leave empty for /
11+
PUBLIC_URL_PREFIX: ""
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions-rs/toolchain@v1
16+
with:
17+
toolchain: stable
18+
target: wasm32-unknown-unknown
19+
override: true
20+
profile: minimal
21+
22+
- uses: actions/cache@v2
23+
with:
24+
path: |
25+
~/.cargo/registry
26+
~/.cargo/git
27+
target
28+
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}
29+
restore-keys: |
30+
cargo-${{ runner.os }}-
31+
32+
- name: Install trunk
33+
run: cargo install trunk wasm-bindgen-cli
34+
35+
- name: Build examples
36+
run: |
37+
output="$(pwd)/dist"
38+
39+
for path in examples/*; do
40+
if [[ ! -d $path ]]; then
41+
continue
42+
fi
43+
44+
example=$(basename "$path")
45+
46+
# multi_thread doesn't work yet. See <https://github.com/thedodd/trunk/issues/40>.
47+
if [[ "$example" == "multi_thread" ]]; then
48+
continue
49+
fi
50+
51+
echo "building: $example"
52+
(
53+
cd "$path"
54+
dist_dir="$output/$example"
55+
56+
trunk build --release --dist "$dist_dir" --public-url "$PUBLIC_URL_PREFIX/$example"
57+
)
58+
done
59+
60+
- name: Deploy to Firebase
61+
uses: w9jds/firebase-action@master
62+
with:
63+
args: deploy --only hosting:examples
64+
env:
65+
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}

.github/workflows/pull-request.yml

+3
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ jobs:
102102
restore-keys: |
103103
cargo-${{ runner.os }}-
104104
105+
- name: Check spelling
106+
run: bash ci/spellcheck.sh list
107+
105108
- name: Run doctest
106109
uses: actions-rs/cargo@v1
107110
with:

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ orig.*
55
/.idea
66
/.vscode
77
/cmake-build-debug
8+
/dist
89
/website/yarn.lock
910
/website/node_modules
1011
/website/package-lock.json

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Setting up your local development environment
44

5-
### Add the WASM target
5+
### Add the Wasm target
66

77
```bash
88
rustup target add wasm32-unknown-unknown

Cargo.toml

+3-21
Original file line numberDiff line numberDiff line change
@@ -10,52 +10,34 @@ members = [
1010
"yew-router",
1111
"yew-router-macro",
1212
"yew-router-route-parser",
13-
"yew-router/examples/minimal",
14-
"yew-router/examples/router_component",
15-
"yew-router/examples/switch",
1613

1714
# Utilities
1815
"yewtil",
1916
"yewtil-macro",
20-
"yewtil/examples/pure_component",
21-
# "yewtil/examples/dsl",
22-
"yewtil/examples/lrc",
23-
"yewtil/examples/history",
24-
"yewtil/examples/mrc_irc",
25-
"yewtil/examples/effect",
26-
"yewtil/examples/fetch",
27-
"yewtil/examples/futures",
28-
"yewtil/examples/function_component",
2917

3018
# dsl
3119
"yew-dsl",
3220

3321
# Examples
22+
"examples/boids",
3423
"examples/counter",
3524
"examples/crm",
36-
"examples/custom_components",
3725
"examples/dashboard",
3826
"examples/file_upload",
39-
"examples/fragments",
40-
"examples/futures_wp",
27+
"examples/futures",
4128
"examples/game_of_life",
4229
"examples/inner_html",
4330
"examples/js_callback",
4431
"examples/keyed_list",
45-
"examples/large_table",
46-
"examples/minimal",
47-
"examples/minimal_wp",
4832
"examples/mount_point",
4933
"examples/multi_thread",
5034
"examples/nested_list",
5135
"examples/node_refs",
52-
"examples/npm_and_rest",
5336
"examples/pub_sub",
37+
"examples/router",
5438
"examples/store",
55-
"examples/textarea",
5639
"examples/timer",
5740
"examples/todomvc",
5841
"examples/two_apps",
5942
"examples/webgl",
60-
"examples/boids",
6143
]

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
</p>
1717

1818
<h4>
19-
<a href="https://yew.rs/docs">Documentation</a>
19+
<a href="https://yew.rs/docs">Documentation (stable)</a>
20+
<span> | </span>
21+
<a href="https://yew.rs/docs/en/next/intro/">Documentation (latest)</a>
2022
<span> | </span>
2123
<a href="https://github.com/yewstack/yew/tree/v0.17/examples">Examples</a>
2224
<span> | </span>

ci/dictionary.txt

+8-57
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,20 @@
1-
personal_ws-1.1 en 72 utf-8
2-
APIs
3-
AddOne
1+
personal_ws-1.1 en 88 utf-8
42
Angular's
5-
AppRoute
6-
Barebones
7-
Borrow
8-
BorrowMut
9-
ComponentLink
103
Config
11-
ConsoleService
124
Deref
13-
DerefMut
14-
DevTools
15-
ExampleProps
165
Github
17-
HashMap
18-
IHtmlElement
19-
INIT
20-
InputElement
21-
Javascript
6+
Json
227
Lifecycle
23-
MaterialUi
24-
MyComponent
25-
NeqAssign
26-
NodeRef
27-
Optimisations
28-
Optimizations
29-
PartialEq
30-
PureComponents
31-
README
32-
React
338
React's
34-
RouteAgent
35-
RouteService
36-
Routeservice
37-
SetInputEnabled
38-
ShouldRender
39-
SomePureComponent
40-
TODO
419
Todo
42-
TryFrom
43-
Vec
4410
VecDeque
45-
ViewPost
46-
ViewPosts
47-
Vuetify
48-
WebAssembly
4911
Webpack
50-
WeeAlloc
51-
Workspaces
52-
Yewtil
5312
alloc
5413
allocator
5514
asmjs
5615
backends
57-
behavior
16+
barebones
5817
binaryen
59-
bincode
6018
bindgen
6119
bool
6220
boolean
@@ -68,11 +26,8 @@ composable
6826
declaratively
6927
doctype
7028
emscripten
71-
endcode
72-
endhint
7329
enum
7430
enums
75-
favor
7631
href
7732
html
7833
impl
@@ -84,35 +39,31 @@ lang
8439
libs
8540
lifecycle
8641
memoized
87-
minimising
42+
metaprogramming
8843
minimize
8944
miniserve
9045
mkdir
9146
natively
9247
onclick
93-
optimisations
94-
optimization
95-
optimizations
96-
optimize
97-
optimizes
9848
proc
9949
rlib
10050
roadmap
10151
rollup
52+
rustc
53+
rustfmt
10254
rustwasm
103-
serializing
10455
stacktraces
105-
standardization
10656
stdweb
10757
struct
10858
structs
10959
tbody
11060
thead
11161
toml
112-
unboxed
11362
usize
11463
vdom
64+
vtag
11565
wasm
11666
webpack
11767
workspaces
68+
vuetify
11869
yewtil

ci/spellcheck.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ elif [[ "$mode" == "list" ]]; then
7474
fi
7575

7676
for fname in "${markdown_sources[@]}"; do
77-
command=$(aspell --ignore 3 --personal="$dict_path" "$mode" < "$fname")
77+
command=$(aspell --ignore 3 --camel-case --personal="$dict_path" "$mode" < "$fname")
7878
if [[ -n "$command" ]]; then
7979
for error in $command; do
8080
# FIXME: find more correct way to get line number

docs/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ If your PR is something bigger create an issue beforehand. This will save everyo
2020

2121
## Spelling and grammar
2222

23-
We recognise that not everyone who contributes to Yew will have "perfect" grammar or be a native
23+
We recognize that not everyone who contributes to Yew will have "perfect" grammar or be a native
2424
English speaker. We're all human; everyone makes mistakes and nobody will look down on you if you
2525
make typos or grammar mistakes (we'll just fix them, merge PRs and move on with life).
2626

0 commit comments

Comments
 (0)