Skip to content

Commit

Permalink
Updating examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Pauan committed Apr 24, 2023
1 parent b0f1c18 commit 9ac1a74
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 72 deletions.
11 changes: 0 additions & 11 deletions examples/animation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,6 @@ readme = "README.md"
license = "MIT"
edition = "2018"

[profile.release]
lto = true
codegen-units = 1
opt-level = 3 # 3 => fast, s/z => small

[package.metadata.wasm-pack.profile.release]
wasm-opt = ["-O4"] # O4 => fast, Oz/Os => small

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

[workspace]

[dependencies]
Expand Down
6 changes: 3 additions & 3 deletions examples/animation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
yarn install
```

## How to build
## How to build for development

```sh
# Builds the project and opens it in your browser.
# It will auto-reload when you make any changes.
yarn start
yarn watch
```

## How to build for production

```sh
# Builds the project and places it into the `dist` folder.
yarn run build
yarn build
```
8 changes: 4 additions & 4 deletions examples/animation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"name": "animation",
"version": "0.1.0",
"scripts": {
"build": "rimraf dist/js && rollup --config",
"start": "rimraf dist/js && rollup --config --watch"
"build": "rimraf dist/js && rollup --bundleConfigAsCjs --config",
"watch": "rimraf dist/js && rollup --bundleConfigAsCjs --config --watch"
},
"devDependencies": {
"@wasm-tool/rollup-plugin-rust": "^2.0.0",
"rimraf": "^3.0.2",
"rollup": "^2.50.2",
"rimraf": "^5.0.0",
"rollup": "^3.21.0",
"rollup-plugin-livereload": "^2.0.0",
"rollup-plugin-serve": "^2.0.0",
"rollup-plugin-terser": "^7.0.2"
Expand Down
11 changes: 0 additions & 11 deletions examples/async/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,6 @@ readme = "README.md"
license = "MIT"
edition = "2018"

[profile.release]
lto = true
codegen-units = 1
opt-level = 3 # 3 => fast, s/z => small

[package.metadata.wasm-pack.profile.release]
wasm-opt = ["-O4"] # O4 => fast, Oz/Os => small

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

[workspace]

[dependencies]
Expand Down
6 changes: 3 additions & 3 deletions examples/async/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
yarn install
```

## How to build
## How to build for development

```sh
# Builds the project and opens it in your browser.
# It will auto-reload when you make any changes.
yarn start
yarn watch
```

## How to build for production

```sh
# Builds the project and places it into the `dist` folder.
yarn run build
yarn build
```
8 changes: 4 additions & 4 deletions examples/async/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"name": "async",
"version": "0.1.0",
"scripts": {
"build": "rimraf dist/js && rollup --config",
"start": "rimraf dist/js && rollup --config --watch"
"build": "rimraf dist/js && rollup --bundleConfigAsCjs --config",
"watch": "rimraf dist/js && rollup --bundleConfigAsCjs --config --watch"
},
"devDependencies": {
"@wasm-tool/rollup-plugin-rust": "^2.0.0",
"rimraf": "^3.0.2",
"rollup": "^2.50.2",
"rimraf": "^5.0.0",
"rollup": "^3.21.0",
"rollup-plugin-livereload": "^2.0.0",
"rollup-plugin-serve": "^2.0.0",
"rollup-plugin-terser": "^7.0.2"
Expand Down
11 changes: 0 additions & 11 deletions examples/counter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,6 @@ readme = "README.md"
license = "MIT"
edition = "2018"

[profile.release]
lto = true
codegen-units = 1
opt-level = 3 # 3 => fast, s/z => small

[package.metadata.wasm-pack.profile.release]
wasm-opt = ["-O4"] # O4 => fast, Oz/Os => small

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

[workspace]

[dependencies]
Expand Down
6 changes: 3 additions & 3 deletions examples/counter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
yarn install
```

## How to build
## How to build for development

```sh
# Builds the project and opens it in your browser.
# It will auto-reload when you make any changes.
yarn start
yarn watch
```

## How to build for production

```sh
# Builds the project and places it into the `dist` folder.
yarn run build
yarn build
```
8 changes: 4 additions & 4 deletions examples/counter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"name": "counter",
"version": "0.1.0",
"scripts": {
"build": "rimraf dist/js && rollup --config",
"start": "rimraf dist/js && rollup --config --watch"
"build": "rimraf dist/js && rollup --bundleConfigAsCjs --config",
"watch": "rimraf dist/js && rollup --bundleConfigAsCjs --config --watch"
},
"devDependencies": {
"@wasm-tool/rollup-plugin-rust": "^2.0.0",
"rimraf": "^3.0.2",
"rollup": "^2.50.2",
"rimraf": "^5.0.0",
"rollup": "^3.21.0",
"rollup-plugin-livereload": "^2.0.0",
"rollup-plugin-serve": "^2.0.0",
"rollup-plugin-terser": "^7.0.2"
Expand Down
11 changes: 0 additions & 11 deletions examples/todomvc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,6 @@ readme = "README.md"
license = "MIT"
edition = "2018"

[profile.release]
lto = true
codegen-units = 1
opt-level = 3 # 3 => fast, s/z => small

[package.metadata.wasm-pack.profile.release]
wasm-opt = ["-O4"] # O4 => fast, Oz/Os => small

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

[workspace]

[dependencies]
Expand Down
6 changes: 3 additions & 3 deletions examples/todomvc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
yarn install
```

## How to build
## How to build for development

```sh
# Builds the project and opens it in your browser.
# It will auto-reload when you make any changes.
yarn start
yarn watch
```

## How to build for production

```sh
# Builds the project and places it into the `dist` folder.
yarn run build
yarn build
```
8 changes: 4 additions & 4 deletions examples/todomvc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"name": "todomvc",
"version": "0.1.0",
"scripts": {
"build": "rimraf dist/js && rollup --config",
"start": "rimraf dist/js && rollup --config --watch"
"build": "rimraf dist/js && rollup --bundleConfigAsCjs --config",
"watch": "rimraf dist/js && rollup --bundleConfigAsCjs --config --watch"
},
"devDependencies": {
"@wasm-tool/rollup-plugin-rust": "^2.0.0",
"rimraf": "^3.0.2",
"rollup": "^2.50.2",
"rimraf": "^5.0.0",
"rollup": "^3.21.0",
"rollup-plugin-livereload": "^2.0.0",
"rollup-plugin-serve": "^2.0.0",
"rollup-plugin-terser": "^7.0.2"
Expand Down

0 comments on commit 9ac1a74

Please sign in to comment.