Skip to content

Commit 889fd8a

Browse files
committed
Setup deployment for examples using monorepo config for Now.
1 parent 30c601c commit 889fd8a

File tree

18 files changed

+403
-656
lines changed

18 files changed

+403
-656
lines changed

examples/basic-fetch/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
# Basic fetch with React Async
22

33
This demonstrates a very simple HTTP GET using `fetch`, wrapped with React Async.
4+
5+
<a href="https://react-async.ghengeveld.now.sh/examples/basic-fetch">
6+
<img src="https://img.shields.io/badge/live-demo-blue.svg" alt="live demo">
7+
</a>

examples/basic-fetch/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "basic-fetch-example",
33
"version": "1.0.1",
44
"private": true,
5+
"homepage": "https://react-async.ghengeveld.now.sh/examples/basic-fetch",
56
"scripts": {
67
"postinstall": "relative-deps",
78
"prestart": "relative-deps",
@@ -10,7 +11,7 @@
1011
"start": "react-scripts start",
1112
"build": "react-scripts build",
1213
"test": "react-scripts test",
13-
"now-build": "npm run build && mv build dist"
14+
"now-build": "SKIP_PREFLIGHT_CHECK=true react-scripts build"
1415
},
1516
"dependencies": {
1617
"react": "^16.8.6",

examples/basic-hook/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
# Basic fetch with useAsync hook
22

33
This demonstrates how to use the `useAsync` hook.
4+
5+
<a href="https://react-async.ghengeveld.now.sh/examples/basic-hook">
6+
<img src="https://img.shields.io/badge/live-demo-blue.svg" alt="live demo">
7+
</a>

examples/basic-hook/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "basic-hook-example",
33
"version": "1.0.2",
44
"private": true,
5+
"homepage": "https://react-async.ghengeveld.now.sh/examples/basic-hook",
56
"scripts": {
67
"postinstall": "relative-deps",
78
"prestart": "relative-deps",
@@ -10,7 +11,7 @@
1011
"start": "react-scripts start",
1112
"build": "react-scripts build",
1213
"test": "react-scripts test",
13-
"now-build": "npm run build && mv build dist"
14+
"now-build": "SKIP_PREFLIGHT_CHECK=true react-scripts build"
1415
},
1516
"dependencies": {
1617
"react": "^16.8.6",

examples/custom-instance/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
# Custom React Async instance
22

33
Demonstrates how to use a preconfigured React Async instance.
4+
5+
<a href="https://react-async.ghengeveld.now.sh/examples/custom-instance">
6+
<img src="https://img.shields.io/badge/live-demo-blue.svg" alt="live demo">
7+
</a>

examples/custom-instance/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "custom-instance-example",
33
"version": "1.0.1",
44
"private": true,
5+
"homepage": "https://react-async.ghengeveld.now.sh/examples/custom-instance",
56
"scripts": {
67
"postinstall": "relative-deps",
78
"prestart": "relative-deps",
@@ -10,7 +11,7 @@
1011
"start": "react-scripts start",
1112
"build": "react-scripts build",
1213
"test": "react-scripts test",
13-
"now-build": "npm run build && mv build dist"
14+
"now-build": "SKIP_PREFLIGHT_CHECK=true react-scripts build"
1415
},
1516
"dependencies": {
1617
"react": "^16.8.6",

examples/movie-app/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@
22

33
This is a rebuild of the [React Suspense IO demo](https://reactjs.org/blog/2018/03/01/sneak-peek-beyond-react-16.html)
44
by Dan Abramov at JSConf Iceland 2018, using React Async instead of Suspense.
5+
6+
<a href="https://react-async.ghengeveld.now.sh/examples/movie-app">
7+
<img src="https://img.shields.io/badge/live-demo-blue.svg" alt="live demo">
8+
</a>

examples/movie-app/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "movie-app-example",
33
"version": "1.0.2",
44
"private": true,
5+
"homepage": "https://react-async.ghengeveld.now.sh/examples/movie-app",
56
"scripts": {
67
"postinstall": "relative-deps",
78
"prestart": "relative-deps",
@@ -10,7 +11,7 @@
1011
"start": "react-scripts start",
1112
"build": "react-scripts build",
1213
"test": "react-scripts test",
13-
"now-build": "npm run build && mv build dist"
14+
"now-build": "SKIP_PREFLIGHT_CHECK=true react-scripts build"
1415
},
1516
"dependencies": {
1617
"react": "^16.8.6",
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
# Abortable fetch with React Async
22

33
This demonstrates a very simple HTTP GET using `fetch`, which gets the AbortSignal passed in to actually abort the HTTP request when the promise is canceled.
4+
5+
<a href="https://react-async.ghengeveld.now.sh/examples/with-abortcontroller">
6+
<img src="https://img.shields.io/badge/live-demo-blue.svg" alt="live demo">
7+
</a>

examples/with-abortcontroller/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "with-abortcontroller-example",
33
"version": "1.0.1",
44
"private": true,
5+
"homepage": "https://react-async.ghengeveld.now.sh/examples/with-abortcontroller",
56
"scripts": {
67
"postinstall": "relative-deps",
78
"prestart": "relative-deps",
@@ -10,7 +11,7 @@
1011
"start": "react-scripts start",
1112
"build": "react-scripts build",
1213
"test": "react-scripts test",
13-
"now-build": "npm run build && mv build dist"
14+
"now-build": "SKIP_PREFLIGHT_CHECK=true react-scripts build"
1415
},
1516
"dependencies": {
1617
"react": "^16.8.6",

0 commit comments

Comments
 (0)