Commit graph

42 commits

Author SHA1 Message Date
Robin
c47f3d84c4
Unify installation scripts for example apps (#19808) 2021-01-24 17:05:49 +01:00
Luis Alvarez D
e28fd50441
Include utm_source on example links to vercel.com (#21305) 2021-01-19 07:28:54 +00:00
Luc Leray
8eaabe2fb0
Fix deploy buttons URLs (#20834)
Fix all deploy button URLs in the Next.js repo to follow the following format:
```
https://vercel.com/new/git/external?repository-url=https://github.com/vercel/next.js/tree/canary/examples/<EXAMPLE_NAME>&project-name=<EXAMPLE_NAME>&repository-name=<EXAMPLE_NAME>
```

The detailed docs for the Deploy Button can be found here: https://vercel.com/docs/more/deploy-button.

Also updates legacy Vercel import flow URLs (starting with vercel.com/import or with vercel.com/new/project), to use the new vercel.com/new URLs.

---

For example, for the `hello-world` example:

The URL is https://vercel.com/new/git/external?repository-url=https://github.com/vercel/next.js/tree/canary/examples/hello-world&project-name=hello-world&repository-name=hello-world

And the deploy button looks like this:
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https://github.com/vercel/next.js/tree/canary/examples/hello-world&project-name=hello-world&repository-name=hello-world)

---

For reference, I used the following regexes to search for the incorrect URLs

```
\(https://vercel.com/import/git\?s=https://github.com/vercel/next.js/tree/canary/examples/(.*)\)
\(https://vercel.com/import/git\?c=1&s=https://github.com/vercel/next.js/tree/canary/examples/([^&]*)(.*)\)
\(https://vercel.com/import/project\?template=https://github.com/vercel/next.js/tree/canary/examples/(.*)\)
https://vercel.com/import/git
https://vercel.com/import/select-scope
https://vercel.com/import
https://vercel.com/new/project
```
2021-01-07 01:40:29 +00:00
Or Yoffe
68c62b3307
Updated dependencies for example: with-react-native-web (#17375)
The current dependencies of  the example "with-react-native-web" are outdated.
In this PR I updated them and tested that they run and work.

Newest current react and react-dom versions: 16.13.1
Newest current  react-native-web and babel-plugin-react-native-web versions: 0.13.14

Mainly for the people starting with this example to have the new versions since the current versions are very far from each other.
Please merge 🙏
2020-10-18 17:56:41 +00:00
Peng Jie
3c99206313
chore(examples): fix missing document components error messages (#16802)
Thanks vercel team create multiple examples for much use cases, I found some error messages and fixed it.
2020-09-03 21:13:12 +00:00
Joe Haddad
f17d435166
Ensure all examples are MIT licensed (#16691) 2020-08-29 22:32:35 -04:00
NorbertLuszkiewicz
c03d4931de
Simplify example usage instructions (#16678)
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-08-29 22:22:02 -04:00
Raibima Putra
3922fa0584
with-react-native-web: move meta viewport to _app.js (#15945) 2020-08-06 12:35:03 -04:00
agstover
fcc4d8cd50
await ctx.renderPage() in examples for TypeScript (#15528)
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-08-04 14:46:40 -04:00
Tanmay Laud
f00ad581a1
Added .gitignore to examples that are deployed to vercel (#15127)
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-07-16 10:52:23 -04:00
Joe Haddad
7d038dfef1
Suggest npx over npm init (#13637)
This updates old examples to the more universal `npx` command.

Fixes https://github.com/vercel/next.js/discussions/12103
2020-06-01 17:36:57 +00:00
Joe Haddad
b7e17e09e5
Update references to zeit/next.js (#13463) 2020-05-27 17:51:11 -04:00
JJ Kasper
1f6ce106ae
Update codeload and deploy links for org rename (#13141)
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-05-27 14:11:39 -04:00
TodorTotev
8618ab85ad
More redundant imports @ examples (#13190)
Again, related to [12964](https://github.com/zeit/next.js/issues/12964)

After checking all the other examples and the ongoing pull requests, I believe that with this PR being merged, all the examples should be free of redundant react imports.
Let me know if you want me to edit anything that you don't like.

Regards

with-typescript
with-atstroturf
with-atlaskit
with-styletron
with-styled-components-rtl
with-stylesheet
with-stomp
with-stitches-styled
with-stitches
with-slate
with-sentry-simple
with-sentry
with-segment-analytics
with-rematch
with-relay-modern
with-reflux
with-redux-wrapper
with-react-relay-network
with-react-native
with-react-multi-carousel
with-react-jss
with-react-helmet
with-react-ga
with-quill-js
with-prefetching
with-google-analytics-amp
with-google-analytics
with-framer-motion
with-flow
with-firebase-hosting
with-firebase-cloud-messaging
with-firebase-authentication
with-expo
with-dynamic-app-layout
with-draft-js
with-cxs
with-cerebral
with-ant-design-mobile
with-algolia-react-instantsearch
using-preact
progressive-render
2020-05-22 15:33:04 +00:00
Joe Haddad
dbad9db68c
Update Examples for Fast Refresh (#13068) 2020-05-18 17:44:18 -04:00
Joe Haddad
86160a5190
Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
Tim Neutkens
483bd3ddda
Rename ZEIT to Vercel (#12075)
* Find/replace

* Update more URLs

* More rename

* Fix remaining examples

* More updates

* Update create-next-app

* Update remaining text

* Update

Co-authored-by: Shu Uesugi <shu@chibicode.com>
2020-04-21 11:47:12 +02:00
Max Thirouin
644a1ef187
examples: react-native-web: fix config to prefer .web.* exts (#10774)
* [examples/with-react-native-web] fix config to get .web.* extensions resolved before other

Simple issue if you have `Compo.js` & `Compo.web.js` (eg 1st for iOS/android & second for web): with current config, .web are resolved after.
My change change this situation so web extensions are resolved before the others.

I removed the `defaultLoaders` since it was not used. Tell me if that was intentional so I can add it back.

* lint-fix

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-03-01 12:32:48 -05:00
Shu Uesugi
c57cdbb31d
Rename zeit.co/new → zeit.co/import (#10674)
* Replace zeit.co/new → zeit.co/import

* Update deployment.md
2020-02-24 19:08:34 -05:00
Shu Uesugi
5f041447bc
Remove Now CLI reference from examples (#10501)
* Find/Replace "Deploy it to the cloud..."

* Find/Replace "Deploy it to the cloud..." (no colon)

* Find/Replace "Deploy it to the cloud..." for firebase

* Convert remaining ones

* Storybook deployment

* Update with-stripe-typescript

* Update contributing.md

* Remove `now`

* Update examples/with-stripe-typescript/README.md

Co-Authored-By: Luis Alvarez D. <luis@zeit.co>
2020-02-12 17:14:57 -05:00
Shu Uesugi
6804039e94 Make example READMEs more consistent (#10124)
* npx create → npm init

* Fix inconsistent instructions

* Update amp-first

* Update with-graphql-react

* with-firebase-cloud-messaging

* Update with-higher-order-component

* change create-next-app url

* Update create-next-app instruction

* Update instructions to use npm instead of npx

* Move "the idea behind the example" to top

* Rename

* Rename

* Update contributing.md with a README template
2020-01-16 23:23:56 +01:00
Luis Alvarez D
7edf0da0c4 Add the deploy button to compatible examples (#9547) 2019-11-27 11:40:58 -05:00
Joe Haddad
18a9c7e371
Improve linting rules to catch more errors (#9374)
* Update `packages/`

* Update examples

* Update tests

* Update bench

* Update top level files

* Fix build

* trigger
2019-11-10 19:24:53 -08:00
Brandon Bayer
1c11ffd1f7 Fix react-native-web example by adding babel plugin (#9078)
* fix react-native-web example by adding babel plugin

* changes
2019-10-27 11:52:52 +01:00
Luis Alvarez D
f10f3304fe Replace the deprecated Create Next App URL (#9032) 2019-10-10 23:34:14 -04:00
Raibima Putra
f47f014f7a Fix react-native-web example FOUC (#8576) 2019-09-02 12:38:51 +02:00
Evan Bacon
e80bbe4b80 [Expo] Updated React Native example (#8376)
* Created a new example for React Native web

- use the latest `react-native-web`
- remove unused `react-art`
- remove redundant `babel-plugin-module-resolver`
- remove unused `.babelrc`
- add missing `app.json` (standard in React Native)
- added example for rendering an `<a />`
- added header examples

* `yarn lint-fix`
2019-08-15 08:01:09 +02:00
Matthew Sweeney
0cd2732c7f
Remove deploy to now button from all examples (#7101) 2019-05-27 12:22:05 -07:00
Connor Davis
3fa04620e7 Remove Deploy To Now buttons (#7126)
* Remove Deploy To Now buttons

* Remove remaining buttons
2019-04-24 10:53:58 +02:00
Benjamin Hanes
dbdd663921 Update with-react-native-web example to use babel (#6170)
Fixes https://github.com/zeit/next.js/issues/6138

Tested with both latest and 8.0.0-canary.17
2019-01-29 13:42:44 +01:00
Juan Olvera
7e12997af6 Test updater script on examples folder (#5993)
I wrote a [script](https://github.com/j0lv3r4/dependency-version-updater) to update dependencies recursively in `package.json` files, e.g.:

```
$ node index.js --path="./examples" --dependencies="react=^16.7.0,react-dom=^16.7.0"
```

This PR contains the result against the examples folder.
2019-01-05 12:19:27 +01:00
Tim Neutkens
9c4eefcdbf
Add prettier for examples directory (#5909)
* Add prettier for examples directory

* Fix files

* Fix linting

* Add prettier script in case it has to be ran again
2018-12-17 17:34:32 +01:00
David Calhoun
ba5f1b2c21 [change] Update react-native-web example (#5489)
Utilize ES modules, which are now the default export for
`react-native-web`.

_NOTE:_ [This example requires `next@^7.0.0`](https://bit.ly/2PaEhao).
2018-10-22 22:32:24 +02:00
komkanit
3e72da686f upgrade react-native-web to fix bug (#5459) 2018-10-20 16:58:03 +02:00
David Calhoun
6f4925c193 [change] Update RNW example (#4787) 2018-07-15 20:59:20 +02:00
Michael Herold
5b3578e58f #4751 - Explicitly mention install when cloning examples (#4758)
Preferably this installation wouldn't be necessary, but in lieu of a fix...

#4751
2018-07-11 23:56:15 +02:00
Dimka Vasilyev
763ddc08a1 added support flex: 1 and and tag support Dimensions (#4460) 2018-05-23 22:47:16 +02:00
Tim Neutkens
c461d46efd Fix viewport issue in with-react-native-web 2018-05-23 22:44:22 +02:00
James Hegedus
f2e56609cd Examples: stabalise README format and create-next-app usage (#4009)
* Examples: clarify language around Yarn create & npx

* add missing READMEs and create-next-app usage

* suggest people tag jthegedus in firebase related issues

* add yarn alt instructions

* cerebraljs example readme & fixes
2018-04-03 14:19:05 +02:00
James Hegedus
b1d8b839dd Examples: use npx and yarn create to run create-next-app on examples (#4002)
* remove global npm install of create-next-app

* add npx to create-next-app command in examples

* add bash to shell snippets

* add yarn create to next-app command in examples

* fix READMEs named with lowercase

* change READMEs to use UPPERCASE
2018-03-14 09:09:46 +01:00
David Calhoun
4469bd056c Fix react-native-web example typo (#3802) 2018-02-14 15:34:35 +01:00
David Calhoun
8b1458af4f Add with-react-native-web example (#3781)
* Add with-react-native-web example

Showcase the required work to use
[react-native-web](https://github.com/necolas/react-native-web) with
Next.js.

* Repair lint warnings
2018-02-13 17:42:31 +01:00