Commit graph

1364 commits

Author SHA1 Message Date
Josiah Wiebe
fe4da73469
feat: update api-routes example to SSG (#11019)
* feat: update api-routes example to SSG

* Update examples/api-routes/components/Person.js

Co-authored-by: Luis Alvarez D <luis@zeit.co>
2020-03-12 17:55:24 -05:00
Alejandro
0f0013b9e4
Update data-fetch example to SSG (#11017)
* Update to SSG

* Change to getServerSideProps

* Fix lint

* Update
2020-03-12 17:21:18 -05:00
Joe Haddad
39ed664966
Fix Lint 2020-03-12 09:09:12 -04:00
Brad Larson
3b5029fb92
cms-datocms SerializableError fixes (#10986) 2020-03-12 13:07:57 +01:00
Petr Messner
76a08c9671
Fix examples with relay-compiler (#10976)
* Example with-react-relay-network-modern: update dependencies

* Example with-react-relay-network-modern: move relay __generated__ out of pages dir

* Example with-react-relay-network-modern: fix some errors

- Without checking if props.allBlogPosts exists it fails sometimes on
  "TypeError: Cannot read property 'edges' of undefined"

- I have no idea how it could work before with Component.query().params.name,
  but maybe some dependent library API has changed

* Example with-relay-modern-server-express: update dependencies

* Example with-relay-modern-server-express: move relay __generated__ out of pages dir

Fixes Error: Build optimization failed: found page without a React Component as default export in
pages/__generated__/pages_indexQuery.graphql

* Example with-relay-modern: update dependencies

* Example with-react-relay-network-modern: fix prettier errors
2020-03-11 20:35:17 +01:00
Shu Uesugi
745494a9a3
Add demo URL for the DatoCMS example (#10901) 2020-03-09 17:47:21 +01:00
Shu Uesugi
bf0ea49b02
DatoCMS Example (#10891)
* Copy cms-datocms

* Update package.json

* Desktop design

* Tablet support

* Mobile styles

* Update titles

* Add article page

* Minor tweaks

* Fix height issue

* Improve text colors

* Extract Alert and Footer components

* Extract avatar

* Add Date

* Extract container

* Fix capitalization

* Make it work with no backend

* Add paragraph styles

* Extract PostPreview

* Extract h2

* Extract more stories

* Refactor into more components

* Update tags

* Add missing key

* Add custom document for lang="" support

* Add dotenv

* Load data for the index page

* Limit posts

* Show post page

* Add markdown processing

* Forgot margin

* Add links

* Remove files and add fallback

* Add og:image

* Add favicon

* Add aria-label

* Fix prerender

* Learn more → read documentation

* Fix links and footer

* Desaturate using imgix

* Add preview secret

* Add preview support

* Fix preview code

* Exit preview mode

* Extract getAllPostsWithSlug

* Extract getAllPostsForHome

* Extract getPreviewPostBySlug

* Extract getPostAndMorePosts

* Extract constants

* Extract markdownToHtml

* Fix markdown styles

* Fix imgix for author

* Add README

* Add links to docs
2020-03-09 11:51:08 +01:00
Tim Neutkens
744b50d5d4
add example for why-did-you-render (#10662)
* add example for why-did-you-render

* Load whyDidYouRender from _app.js

To avoid custom webpack main entry modifications
as this can cause [hydration errors](https://github.com/zeit/next.js/pull/10662#pullrequestreview-365188433)
2020-03-05 23:43:58 +01:00
Tim Neutkens
6679694a1e
Update Custom Server README's (#10843)
* update custom server readmes

* remove deploy buttons
2020-03-05 16:30:48 +01: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
JJ Kasper
c9d9f1131c
Remove unstable_ prefix from new methods (#10723)
* Rename getServerProps to getServerSideProps

* Remove unstable_ prefix from new methods

* Add error when legacy methods are detected

* Add legacy methods for babel transform

* Add unstable_getServerSideProps also

* Apply suggestions from code review

Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>

* Update types import

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-02-27 11:57:39 -06:00
JJ Kasper
2789e7e0c2
Rename getServerProps to getServerSideProps (#10722) 2020-02-27 11:04:30 -06:00
Henrik Wenz
a81913f1ba
Fix apollo example (#10696) 2020-02-25 16:16:34 -05:00
Soichi Takamura
ccb42b0ed5
Update example "with-typescript-graphql" (#10637)
* add peerDeps of graphql-let

* ncu -u && typesync

* Use resolver types for resolver implementation
2020-02-25 01:44:09 -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
Evgeniy Kumachev
18ecaa9d6b
Update with-mobx-keystone-typescript example (#10638) 2020-02-24 09:33:01 -05:00
Rafael Almeida
ee7ea03a59
Remove deprecated static folder (#10632) 2020-02-21 19:09:23 +01:00
Adith Widya Pradipta
fb7298236d
remove next/link (#10625) 2020-02-21 11:00:02 +01:00
Vincent Voyer
f0c823000b
upgrade next-transpile-modules to latest everywhere (#10607)
Following #10492 and comment from @timneutkens I went ahead and updated all
examples relying on next-transpile-modules.
2020-02-20 12:43:55 +01:00
Quinn Turner
1c64c1e93c
fix: Improve grammar of apollo.js comments (#10601) 2020-02-19 14:17:14 -05:00
Fabian Mastenbroek
72a461f913
Do not cache 404 SSR responses (#10596)
This change updates the _ssr-caching_ to not cache the response when a
404 status code has been returned.
2020-02-19 10:59:37 -05:00
Gordey
5e23e35456
Add missin create permission for faunadb example (#10575) 2020-02-18 10:24:57 -05:00
Thor
d5222f8521
Add global CSS styles to example/with-stripe-typescript (#10520)
* Update stripe-node.

* Update casting.

* Add global CSS styles 💅

* Remove emojies from README.

* Add twitter meta.

* Add demo gifs to README.

* Solid card icon.

* lint fix

Co-authored-by: Luis Alvarez D. <luis@zeit.co>
2020-02-13 13:08:18 -05:00
Henrik Wenz
1a50d99fbd
Update withApollo example (#10451)
* Make withApollo work with _app.js components

* Support wrapping functional _App

* Add apolloClient to NextPageContext & NextPageContext

* Propertly call App.getInitialProps if used in NextAppContext

* Add Automatic Static Optimization warning

* Update deps

* Reduce API surface

* Move back to singleton client

* Improve documentation

* Remove Head.rewind()
We can get rid of .rewind by now as the latest next/head no longer uses legacy context.

* Add extra docs

* Reuse apolloState coming from previous hocs

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-02-13 00:26:22 -05:00
Joe Haddad
3e7cfd1f9f
Remove with-data-prefetch Example (#10514) 2020-02-12 23:11:27 -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
Vincent Voyer
189fc985a7
Upgrade next-transpile-modules in workspace examples (#10492)
The latest major release of next-transpile-module (v3) changed the way the
module is used, see: https://github.com/martpie/next-transpile-modules/releases/tag/3.0.0
2020-02-11 22:45:36 +01:00
Luis Alvarez D
fe5c9072df
Update README.md (#10487) 2020-02-10 22:49:54 -05:00
Thor
7dd0b40f82
Add Stripe TypeScript Example (#10482)
Co-authored-by: Luis Alvarez D. <luis@zeit.co>
2020-02-10 22:24:38 -05:00
Vinci Rufus
a33e365c8f get the http2 example to work (#10470)
* copy only the necessary files during stage 2 in multi-stage.

* update readme

* adds  compress:false to prevent the server from crashing while running http2

* moving the config to next.config

* link to the issue

* fix grammatical error

* Update examples/with-http2/next.config.js

Co-Authored-By: Jan Potoms <2109932+Janpot@users.noreply.github.com>

Co-authored-by: Jan Potoms <2109932+Janpot@users.noreply.github.com>
Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-02-09 23:05:53 -05:00
Nainterceptor
e382997ea7 Upgrade koa router in example (#10469)
* Upgrade koa router

* Change koa import
2020-02-08 16:54:28 -05:00
Afsane Fadaei
12a380da23
With threejs example (#10301)
* With threejs example

* static folder replaced with public folder - linting issues resolved

* CR- gitignore removed- readmea updated- css files and package removed

* used plain css file insteaded of styled component

* built in css added

Co-authored-by: welcomebackfda <54882055+welcomebackfda@users.noreply.github.com>
2020-02-07 10:41:19 -05:00
Henrik Wenz
20d88231f4
Make withApollo work with _app.js components (#8801)
* Make withApollo work with _app.js components

* Support wrapping functional _App

* Add apolloClient to NextPageContext & NextPageContext

* Propertly call App.getInitialProps if used in NextAppContext

* Add Automatic Static Optimization warning
2020-02-07 10:18:47 -05:00
Andy
0b1ef7cbf4
Adjust README of example (#10426) 2020-02-05 17:03:41 +01:00
Roman Ernst
c8e5f925a0
Make apollo HOC composable (#10422)
* Wraps config in higher-order function
2020-02-05 17:02:45 +01:00
Andy
44e234e934
Remove builds from examples (#10417)
* Remove `builds` from examples

* Fix with-zones example

* Run prettier on now.json
2020-02-04 18:52:42 +01:00
Joe Haddad
9a8c3100d2
New Jest Example (#10396)
* New Jest Example

* add missing zeit logo

* Revert zeit.svg

* remove old jest examples

* Update jest.config.js
2020-02-03 20:36:55 +01:00
Jorge Cuadra
1db77143f6
Fix with-reasonml example (#10399) 2020-02-03 14:01:41 -05:00
38elements
aa5f918c30
Update Preact Example (#10380) 2020-02-01 23:56:34 -05:00
Justin Elias
9e6689e6db
added fix for #8893 (#10370) 2020-01-31 19:58:46 -05:00
Ivan Kleshnin
d04d976698
Improve api-routes-apollo-server-and-client-auth Example (#10358)
1. Prevent possible race conditions of cache pruning, refetching and redirects

2. Note: the original code has the following defect.

SignOut action restarts the dev server effectively resetting the memory and erasing all the "registered users" data. You have to SignUp again after SignOut. I'm not sure how
to properly fix it a.t.m
2020-01-31 10:27:21 -05:00
Ivan Kleshnin
74c2600b46
Fix api-routes-apollo-server-and-client-auth Example (#10334)
* Fix api-routes-apollo-server-and-client-auth Example

`client.resetStore()` must be called after SignIn, SignOut actions

Otherwise, even the current basic auth is not working 100% of the time...

For example, as caching occurs here:

```
const { data, loading } = useQuery(ViewerQuery)
```

it sometimes (race conditions!) prevents a user from signing in
the current code base.

Check https://github.com/apollographql/apollo-cache-persist/issues/34#issuecomment-371177206 comment for more info.

* Fix api-routes-apollo-server-and-client-auth Example (linting)
2020-01-30 14:33:42 +01:00
Zhe Zhang
3cd4d01d7c
Fixes #10333 with-next-seo sample issues (#10335) 2020-01-30 14:32:53 +01:00
Tim Neutkens
157a7a7b8c
Upgrade with-carbon-components to built-in SCSS (#10321)
Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-30 13:26:26 +01:00
Micah Alcorn
6f16cef3e2
Repair advanced feature reference (#10330)
* Repair advanced feature reference

The explanation of the custom document feature had been moved.

* Update README.md

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-29 19:51:58 -05:00
Abhishek Warokar
372031246d Fix typo in FaunaDB example (#10304)
Colleciton -> Collection
2020-01-28 16:30:16 +01:00
Robin Cussol
6f6989b8e4 Fix with-orbit-components's name in package.json (#10307)
This is to be more consistent with other examples.
2020-01-28 16:10:26 +01:00
Luis Alvarez D
57f72eac9e Add catch all routes example and a link to it in docs (#10202)
* Added example

* Updated readme of the dynamic-routing example

* Updated catch all docs

* Simplified example

* Update examples/catch-all-routes/README.md

Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-27 13:29:05 -05:00
Shu Uesugi
e1083f0e3a docs: remove --save from npm install; avoid system-ui (#10252)
* Minor edits for CSS doc

* Remove unnecessary --save from npm install

* Different font family

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-27 08:35:12 -05:00
Matthew Sweeney
b0053a4a73 Update FaunaDB Example Instructions (#10280)
* update fauna example instructions

* change key name in setup script
2020-01-27 12:52:04 +01:00
Soichi Takamura
f13bf1e2bf [example with-typescript-graphql] Fix type error (#10269)
* fix: Type error

* Improve README.md
2020-01-25 22:32:58 -05:00
Aaron Reisman
a356d2f68c Add Apollo Server and Client Auth Example (#9913)
* Add Apollo Server and Client Auth Example

* Some updates

* Updated docs

Co-authored-by: Luis Alvarez D. <luis@zeit.co>
2020-01-23 14:55:45 -05:00
Rohman Masyhar
320d98e051 Add example with-xstate (#10234)
Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-23 13:24:35 -05:00
Andrew Kim
e2de7a8e78 Update README.md for example project "form-handler" (#10224) 2020-01-23 10:10:46 +01:00
Shu Uesugi
dc0f2678f0 Remove unnecessary exportPathMap from examples (#10218)
Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-22 22:06:07 +01:00
fauna-brecht
7d419f885e Let users define their own database as easily as possible. (#10209)
* Let users define their own client token.

* Make sure users know that GraphQL schema can also be done via the UI

* Update README.md

* Update setup.js

Co-authored-by: Matthew Sweeney <mail@msweeneydev.com>
Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-22 15:16:56 -05:00
MH Rohman Masyhar
275a65555a Add with-stencil example (#10125)
* feat(example): add with-stencil

* feat(docs): add build stencil component

* fix: disable eslint config for h render

* Update README.md

* Delete .editorconfig

* Update index.js

* Fix linting

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-20 16:45:03 -05:00
Thibault
71e29cd80a Update Relay Modern example (#10150)
* chore(npm): update dependencies

* fix(relay): move GraphQL query outside pages folder

* refactor(react): destructure props

* refactor(react): remove unused key and simplify syntax
2020-01-20 16:31:45 -05:00
Aziz Khambati
b72b8e225d [with-emotion-10,11] Update emotion examples to v10 & v11 (#9646)
* Update emotion to v10, use @emotion/core, @emotion/styled

* Add with-emotion-11 and make review changes

* Fix package names and run prettier

* fix readmes

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-20 16:26:22 -05:00
Afzal Sayed
b95214e2cd feat(examples:tailwind): add postcss-preset-env (#10160)
* feat(examples:tailwind): add postcss-preset-env

* fix: prettier

* Review changes

* Update README.md

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-20 16:13:18 -05:00
Michael Stramel
ea0d916b50 example: Convert _app.js to functional components (#10115)
Fix formatting
2020-01-20 16:13:04 -05:00
Kevin Jennison
34f1aefa4a Add example: with-firebase-authentication-serverless (#10078)
* Start from existing example

* Upgrade some dependencies

* Use dotenv

* Remove custom server

* Add serverless Firebase auth

* Add TODOs

* Update project name

* Fix build script

* Remove server middleware from client JS bundle

* Add logout functionality

* Redirect to auth page on logout

* Remove TODO

* Add comments about the cookie-session approach

* Remove the sessions folder

* Add comments for eslint

* Remove unused files

* Clarify comment

* Update README.md

* Rename variable for clarity

* Update README.md

* Change some comments

* Add more to gitignore

* Remove the bundle analyzer

* Move server-side auth user logic from _app.js to a HOC to support static HTML rendering

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-20 16:12:48 -05:00
Shane Kunz
ec658fc998 sends Google Analytics correct url path on fresh page load (#10146) 2020-01-20 11:29:35 -05:00
Ev Haus
bbf19cd99e Minor update for the "with-react-ga" example (#10156) 2020-01-18 19:03:12 -05:00
Sang Song
9352392f4f chore(examples): Update firebase version (#10145) 2020-01-17 23:06:58 +01:00
Zhe Zhang
0b1217e79e Update with-tailwindcss example (#10141)
Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-17 16:02:38 -05:00
Oleg Filonchuk
aa6991f206 update readme.md (#10136)
fixed a little typo
2020-01-17 14:22:40 -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
Lucio Villa
31597bbd18 added amp-img example with fallback attribute (#10122) 2020-01-16 10:09:13 +01:00
Victor Mota
d6721676ca Add an example for Fauna using cookie based auth (round 2) (#9986)
* Add an example for Fauna using cookie based auth.

* Update example to use more secure method of non-js cookie and all authed access via backend api calls.

* Updated README

* Updated files and added prettier

* Remove unused import to fix lint issue.

* Improve documentation on how to setup fauna. Remove client key to simplify setup.

* Remove semicolons

* Lint fix

* Updated readme instructions and deployment

* Fixed client side redirect issue with /profile

* Simplified login code

* Simplified signup code

* Removed isomorphic-unfetch

* Simplified logout

* Removed get-host file

* Removed the custom getInitialProps from withAuthSync

* Removed user email from localStorage

Co-authored-by: Luis Alvarez D. <luis@zeit.co>
2020-01-15 12:08:42 -05:00
Alejandro Garcia Anglada
c30e54283f Added with-styled-components-rtl example (#10074)
* Added with-styled-components-rtl example

* Add idea behing the example

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-14 13:18:31 -05:00
Shu Uesugi
0a67c7ee23 Update basic-export to use zero config support (#10079) 2020-01-14 10:25:56 +01:00
bokuweb
2cd8f1c920 Update server.js (#10056)
I think `httpOnly` property should set as `cookie`'s property.
This is because `SessionOptions` is following.

```
  interface SessionOptions {
    secret: string | string[];
    name?: string;
    store?: Store | MemoryStore;
    cookie?: {
      maxAge?: number;
      signed?: boolean;
      expires?: Date;
      httpOnly?: boolean;
      path?: string;
      domain?: string;
      secure?: boolean | 'auto';
      encode?: (val: string) => string;
      sameSite?: boolean | 'lax' | 'strict' | 'none';
    };
    genid?(req: express.Request): string;
    rolling?: boolean;
    resave?: boolean;
    proxy?: boolean;
    saveUninitialized?: boolean;
    unset?: string;
  }
```
2020-01-13 12:17:06 +01:00
David Baumgold
72a898a7be Correct spelling: withApollo (#10055) 2020-01-12 13:24:08 -05:00
Odi
b9af20fd5e Add with-chakra-ui example (#10033)
* add with-chakra-ui example

* lint

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-10 11:24:39 -05:00
Tim Neutkens
b5080f1010 Update css examples to use built-in CSS support (#10029)
* Update tailwind example

* Update blog-starter example

* Update with-next-css example

* Update with-quill-js

* Update with-rbx-bulma-pro

* Remove incompatible example

* Update with-react-multi-carousel

* Update-with-semantic-ui

* Update with-videojs example

* Remove @zeit/next-css from package.json of updated examples

* Remove deprecated examples

* Remove target from all examples

* Update package.json

* Apply suggestions from code review

Co-Authored-By: Joe Haddad <timer@zeit.co>

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-10 09:09:28 -05:00
Ty Mick
c837ed151b example: fix npm/yarn install/run instructions (#10023)
**npm** section currently shows both npm and yarn, while **yarn** section shows just npm.
2020-01-09 20:16:44 -05:00
takehiro
66f871b04b Add with redux wrapper hooks (#9954)
Co-authored-by: Luis Alvarez D. <luis@zeit.co>
2020-01-09 10:31:49 -05:00
takehiro
95c2e57e77 with cookie auth latest (#10005) 2020-01-09 09:50:33 -05:00
Soichi Takamura
5fafd1a75b Proposing a new example "with-typescript-graphql" (#9803)
* New example with-typescript-graphql

* Update newer graphql-let

* Apply @lfades 's suggestions

* Use "lib" for tools directory
* Move config decorator to next.config.js
* Apply stricter tsconfig
* mod: hide the word "apollo" from users

* mod: Use variable name `withApollo`

* Use the later version of graphql-let

* Only pages can be in pages

* Life improvements

* fix: .grpahql-let.yml point to the wrong document path

* Use a wider glob for less pitfalls
* Add a note about it in README.md

Co-authored-by: Luis Alvarez D. <luis@zeit.co>
2020-01-08 13:39:00 -05:00
Evgeniy Kumachev
ef6df482bf Add with-mobx-keystone-typescript example (#9844)
* add with-mobx-keystone-typescript example

* Use latest Next.js and removed gitignore

* Fixed my suggestions

* Enabled strict mode and simplified _app

Co-authored-by: Luis Alvarez D. <luis@zeit.co>
2020-01-03 15:10:02 -05:00
Sergio Xalambrí
251f56b81f Tailwind example only run PurgeCSS in production (#9846)
* Tailwind example only run PurgeCSS in production

* Apply lint

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-03 13:01:32 -05:00
Luis Alvarez D
fbcc0e818e
😌 (#9923) 2020-01-03 12:34:20 -05:00
Vinci Rufus
2e3a972033 Update the docker multistage to copy only the necessary files (#9899)
* copy only the necessary files during stage 2 in multi-stage.

* update readme
2020-01-03 11:36:04 +01:00
Bee Ellis
d166840e5a Fix shadowing of apolloClient (#9917)
* Remove redefinition of apolloClient

It seems that the definition of `apolloClient` on line 47 seems to be a intended to be defining the `apolloClient` defined in global scope. That re-declaration of the `apolloClient` variable is removed in favor of assigning the return of `initApolloClient()` to the globally defined `apolloClient`

* Rename the global apollo client to globalApolloClient
2020-01-03 11:13:54 +01:00
Tim Neutkens
d59858e32c
Remove example (#9910)
Closes #8935 #8934
2020-01-03 00:29:34 +01:00
Sarbast Mohammed
d55b464069 fix with-next-offline example (#9900) 2020-01-02 11:50:27 -05:00
Alejandro Garcia Anglada
5be30aae88 Support static export and server hosted build and update docs (#9783) 2019-12-31 10:15:06 -05:00
s
921f7544c1 [with-react-intl] Fix message extraction script on consecutive builds (#9788)
* Remove next folder before build in with-react-intl

* Relax message id requirement in with-react-intl

* @formatjs/cli instead of babel-plugin-react-intl

* default-lang.js -> extract.js

Co-authored-by: Joe Haddad <timer150@gmail.com>
2019-12-23 15:32:55 -05:00
Martin Twum Mensah
b95228ed89 chore: fix typo of Unkown to Unknown (#9809) 2019-12-22 12:07:33 +01:00
Robin Millette
c27dff9b64 Fix relay URL (#9806)
* Fix relay URL

* Fix relay URL

* Fix relay URL
2019-12-22 12:01:36 +01:00
JP Lew
034760903d [docs] update custom-server-reasonml README to use create-next-app (#9792)
* update README to use create-next-app

* add links and update urls

* update BuckleScript package

* add node_modules to .gitignore

* fix the create-next-app command

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2019-12-21 13:51:41 -06:00
Jeremy Asuncion
1f9a40b644 Fix source in electron build (#9802)
* copy only compiled files into electron build for with-electron-typescript

* updated npm deps for with-electron-typescript

* copy only compiled files into electron build for with-electron

* updated npm deps for with-electron

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2019-12-21 13:25:27 -06:00
francismarcus
05e8b38e16 Updated packages for examples/with-typescript (#9791)
* Update packages

* Update examples/with-typescript/package.json

Co-Authored-By: JJ Kasper <jj@jjsweb.site>

* Run lint-fix

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2019-12-19 16:13:04 -06:00
James Mosier
8bf8c86516 [example] Added AMP Google Analytics example (#9723)
* added AMP Google Analytics integration example

* added Amp custom element component w/ separate analytics component
2019-12-18 16:24:15 -05:00
Sandrino Di Mattia
d0424d201d Update auth0 sample: bump dependencies and improve config management (#9778)
* Update auth0 sample: bump dependencies and improve config management

* Fixed linter

* Fix symlink
2019-12-18 14:16:00 -05:00
James Russo
a7e96706fc Update with-sentry example to not use sentry-testkit (#9777)
With an update to sentry-testkit to depend on native node modules
this example no longer works in the browser. Sentry-testkit is made
for a node server not to work in the browser. However, with this
change we no longer require sentry-testkit in our setup for sentry.
Before this change with the update of sentry-testkit to 3.1 we were
encountering errors when trying to run the next.js local development
server because it was trying to load sentry-testkit in the browser.

Thank you to @ohana54 for his example found here https://github.com/wix/sentry-testkit/issues/43
this will now close this issue https://github.com/zeit/next.js/issues/9768
as well.
2019-12-18 17:51:46 +01:00
Lar Van Der Jagt
c4567a1a81 Fix TypeError in with-graphql-hooks example (#9658)
Reported at https://github.com/zeit/next.js/issues/9617

Use `AppTree` so that `withRouter` works correctly.
2019-12-12 04:12:04 -05:00
Henrik Wenz
8a04353bbd Update example/with-dynamic-import (#9667)
* Migrate to functional components

* Remove deprecated modules syntax

* Remove description

* Remove Counter
2019-12-09 00:22:51 -05:00
Andreas Opferkuch
d892229623 Simplify config in with-jest-typescript example (#9664)
jest didn't include TS extensions by default, now it does.
Plus some minor adjustments.
2019-12-08 18:12:21 +01:00
Qurage
f9e4f18691 Update example analyze bundles (#9645)
* Update analyze-bundles example

* follow these updates:
  1. `server` and `browser` options
    * 9ecca7b492/packages/next-bundle-analyzer/index.js
  2. "Deprecate next-bundle-analyzer"
    * e453804d07 (diff-5cea9b17189292d8fedc98eeda86bb0b)
  3. "Move next-bundle-analyzer to Next.js repo"
    * 42cff0a09c (diff-4e57124572a8e05f52d373c300523f6a)
    * "Remove options from bundle-analyzer"

* Support Windows in analyze bundles example

* Remove empty webpack config from analyze bundle example

* 4943d844cc (r354844766)
2019-12-07 15:33:08 +01:00
Lar Van Der Jagt
926a4e5abc Fix instructions for with-netlify-cms example (#9637)
Looks like the directory name was missed after a copy/paste from another example.
2019-12-05 11:23:20 -06:00
Dave Brudner
442fbfaa4d Update with-socket.io example (#9583)
* Using custom hook instead of `_app.js` to interface with
`socket.io-client`
2019-12-05 11:08:09 -05:00
Paul-Emile
b6bdab57c9 Add babel-plugin-graphql-tag to the with-apollo example (#9635) 2019-12-05 10:50:20 -05:00
Natalie Marleny
cbacc8a43c Enhancement: Remove caret range for node-sass (#9630)
- In with-next-sass example package
- Do not want example to use version 4.13.0 of node-sass
2019-12-04 18:34:41 -05:00
Natalie Marleny
3094b15c54 Enhancement: Upgrade css-loader version to 1.0.0 (#9629)
- For with-algolia-react-instantsearch example
2019-12-04 18:33:29 -05:00
Prabusah
743248f177 with-material-ui example linked to mui-org/material-ui (#9605) (#9616) 2019-12-04 11:47:51 +01:00
C. T. Lin
0e1f2f36a3 Move cross-env from devDependencies to dependencies (#9580) 2019-12-01 10:36:27 +01:00
Luis Alvarez D
7edf0da0c4 Add the deploy button to compatible examples (#9547) 2019-11-27 11:40:58 -05:00
Jayden Seric
547b4acbd8 Update the graphql-react example. (#9550)
- Updated dependencies.
- For compatibility with the current next-graphql-react API, added next.config.js using the `withGraphQLConfig` decorator.
- For compatibility with the current graphql-react API, updated the options used with `useGraphQL`.
- Updated the readme to align with the current graphql-react and next-graphql-react APIs.
- Minor destructuring refactor for clarity.
- Converted the custom App to a functional component.
2019-11-27 10:50:20 +01:00
Alejandro Garcia Anglada
8e4e07bfe2 Fixed next-offline example to serve service worker (#9531)
* Fixed next-offline example to serve service worker

* replaced custom server with rewrites
2019-11-26 21:03:09 -05:00
Mаартен - Maarten
8357f46413 Update progressive enhancement example (#9507)
* no ssr component which uses useEffect hook

This library used wasn't updated for 4 years. I tried to contact the owner, which failed, and decided to create my own. So if you see this PR as a shameless plugin for my own component you can delete it. Just wanted to make this example more up to date.

* Update index.js

* fix linting

* Update index.js

* Update example
2019-11-25 16:32:35 -05:00
Joe Haddad
2cbe4d3560
Remove Broken Example (with-apollo-auth) (#9516) 2019-11-25 14:49:46 -05:00
Alejandro Garcia Anglada
874d3fdbb9 Updated with-jest example to latest versions (#9490)
* Updated with-jest example to latest versions

* Fix linting issue

* Updating snapshots

* Rollback snapshots change
2019-11-23 02:09:50 +01:00
Luis Alvarez D
ca730d7fa7
[Example] Fix typo in with-rbx-bulma-pro (#9494)
Requested [here](https://github.com/zeit/next.js/pull/7728#issuecomment-555695290)
2019-11-22 00:41:39 -05:00
Sebastian Benz
29fdea6d31 Fix typos (#9488)
See https://github.com/zeit/next.js/pull/9109#issuecomment-557139022
2019-11-22 00:35:43 +01:00
Glen Ihrig
625190d06d Update purgecss search path (#9432)
* Update purgecss search string to include typescript files - closes #9415

* fix minor formatting issue
2019-11-20 14:13:45 -05:00
Serhii
6d50b95b7f Typo in with-next-offline example manifest.json (#9472) 2019-11-20 10:39:30 -06:00
Luis Alvarez D
8e2097997e
Remove getInitialProps from the faunadb example (#9427)
* Remove the global fetch

* Update API methods

* Remove getInitialProps from the page

* Add client side fetching
2019-11-15 13:21:08 -05:00
Joe Haddad
34a38d2e40
Linting should be strict (#9418)
This configures our linting to exit without a success status code when warnings are found
2019-11-14 23:01:36 -08:00
James Mosier
5e6f79117f Fix(9312) - Fix redirect logic for with-cookie-auth (#9413)
* Fix redirect logic for unauthenticated flows

* check for lack of existence of window for server code

Co-Authored-By: Luis Alvarez D. <luis@zeit.co>

* remove comment

Co-Authored-By: Luis Alvarez D. <luis@zeit.co>

* remove comment

Co-Authored-By: Luis Alvarez D. <luis@zeit.co>
2019-11-14 10:58:22 -05:00
Luis Alvarez D
f910a92f18
Updated readme (#9405) 2019-11-13 16:26:08 -05:00
fauna-brecht
581e338614 with-graphql-faunadb (#9387)
* with-graphql-faunadb

* Use latest next

* Use node-fetch

* removed import to next/config

* Updated titles

* Lint fix

* Link to the schema
2019-11-13 13:15:27 -05:00
Sebastian Benz
4c2c45338a amp-first example: fix broken inline script (#9389)
* amp-first example: fix broken inline script

* Apply lint-fix
2019-11-12 18:56:24 -08:00
Sebastian Benz
79e717a76b Add AMP First example (#9109)
* Add AMP First example

The sample demonstrates how to build an AMP First Site with AMP. If
follows all the best-practices recommended by Lighthouse and will
result in a fully-qualified PWA.

Live demo of the page: https://my-next-app.sebastianbenz.now.sh/#development=1

* small improvements to AmpScript and AmpState

* remove gitignore

* Update example

* Move styles down in Layout

* Apply lint fix and tweak prop-types

* Add warning for host header usage
2019-11-10 21:30:36 -08:00
Joe Haddad
6bf87b356d
Check formatting on build (#9375) 2019-11-10 20:29:49 -08:00
francismarcus
f3bda83ecc Update dotenv example (#9372)
* Update next.config.js

* Update .env

* Update next.config.js

* Update package.json

* Apply lint-fix

* Update env var name
2019-11-10 19:45:12 -08: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
Raymond
d5486e5b9a Add full-icu package (#9286)
As long as node does not ship with fill-icu this will do the trick making FormattedRelativeTime work on nodejs.
Other polyfill like @formatjs/intl-relativetimeformat/polyfill did not work on nodejs and thus giving an error that client did not match server.
2019-11-09 13:04:38 -08:00
Luis Alvarez D
c8c4efba6c Remove the parameterized-routing example (#9297)
* Remove the example

* Include readme with link to alternative
2019-11-07 10:06:35 -08:00
JJ Kasper
b9c71d373c Revert experimental plugins code from sentry example (#9317) 2019-11-06 12:32:28 -05:00
Tom Wieland
bc176b3b74 [with-firebase] Update to Node v10 and fix lint errors (#9318)
* Changed the version of node from 8 to 10

* fix lint errors
2019-11-05 12:19:34 -05:00
Mikhail Guskov
e9e06099cd update with-jest-react-testing-library (#9307) 2019-11-05 11:19:13 -05:00
Joe Haddad
bbf705f262
Simplify Build Output (#9281)
* Simplify Build Output

* Remove noop tests

* Drop 

* Remove bolding
2019-11-04 11:14:04 -05:00
Daniel Reinoso
d21ad2b44f Add Patternfly example (#9251)
* Add Patternfly example

* Fix lint

* Add missing space

* Remove trailing comma
2019-11-01 22:56:19 -04:00
Tim Neutkens
7c80febcf7 Initial plugins implementation (#9139)
* Add initial bit for plugins

* Add checks for needed metadata values

* Add test

* Initial plugins changes

* Add handling for _app middleware

* Add loading of _document middleware and
handling of multiple default export syntaxes

* Fix insert order for middleware member expression

* Remove early return from middleware plugin from testing

* Add tests for current plugin middlewares

* Update test plugin package.json

* Update handling for class default export

* Update to use webpack loader instead of babel
plugin, remove redundant middleware naming, and add field for required env for plugins

* Add middleware to support material-ui use case
and example material-ui plugin

* Update tests and remove tests stuff from google analytics plugin

* Remove old plugin suite

* Add init-server middleware

* Exit hard without stack trace when error in collecting plugins

* Add on-error-client and on-error-server and update
to run init-server with next-start in serverless mode

* Update init-client for google analytics plugin

* Add example Sentry plugin and update with-sentry-simple

* Remove middleware field/folder and use src dir for plugins

* Add post-hydration middleware and update
material-ui plugin

* Put plugins code behind flag

* Update chromedriver

* Revert "Update chromedriver"

This reverts commit 1461e978e677f7da05e29e0415ec614a04bf65f9.

* Update lock file

* Remove un-needed _app for sentry example

* Add auto loading of scoped packages, add plugins
config for manually listing plugins, and update
to only collect plugins once

* Update example plugins

* Expose plugins' config

* Rename plugin lifecycles and add babel-preset-build

* Rename other methods with unstable

* Update log when plugin config overrides auto-detecting
2019-11-01 14:13:13 -05:00
Martin Grubinger
81066a396c Fix example active-class-anme: Add support for children of ActiveLink without a className. (#9271)
* Fix example active-class-anme: Add support for children of ActiveLink without a className.

* Update examples/active-class-name/components/ActiveLink.js

Co-Authored-By: Luis Alvarez D. <luis@zeit.co>
2019-10-31 14:05:12 -05:00
Henrik Wenz
e09eb8d415 Update with-apollo-and-redux example (#9270)
close #8830
2019-10-31 10:40:34 -04:00
Tim Neutkens
4c6e294ca2 Add experimental example of next-news (#9249)
* Add next-news example

* Update components

* Use getStaticProps

* Move directory
2019-10-30 09:05:45 -04:00
Joe Haddad
6b54e9ed66 Fix Prettier Commit Hook (#9245)
* Apply format to webpack config

* hit all files
2019-10-30 12:35:51 +01:00
Nate Moore
61a9cfb317 Add Framer Motion example (#9185)
* Add example for Framer Motion

* Prevent scroll on route change

* Replace hook with more robust useId hook

* Improve scroll behavior

* Remove custom hook in favor of gitInitialProps

* Update framer-motion, react

* Update readme

* Fix lint errors
2019-10-29 23:21:03 -04:00
Nataliya Karatkova
a25085f37e Update static export example: clean up an extra query param (#9239) 2019-10-29 16:36:04 -05:00
Nataliya Karatkova
07b46d7f9a Update examples: static export using dynamic routes instead exp… (#9237) 2019-10-29 17:17:48 +01:00
Juan Miguel
d40f010df3 Delete _document.js (#9236)
After https://github.com/zeit/next.js/pull/5887, _document.js file is not needed anymore
2019-10-29 15:36:18 +01:00
Nataliya Karatkova
4584ea47f6 Fix examples #9064: bumps next-redux-wrapper package version that contains babel runtime fix (#9214) 2019-10-27 22:31:39 +01: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
LadiesMan217
94e81c02b9 Update with-react-intl example (#9180) 2019-10-26 16:11:30 +02:00
Jason Dreyzehner
a964dc825e update with-mdx example to latest packages (#9186) 2019-10-24 08:52:30 +02:00
Zack Krida
9581d8a626 Fix with-tailwindcss build issues (#9179) 2019-10-23 11:06:33 -04:00
Taylor Bryant
b96f1ae285 Add Purgecss to with-tailwindcss example (#9145)
* Add Purgecss

* Remove trailing comma

* Fix linting errors

* Update README.md

* Add cssnano to PostCSS plugins

* Use single quotes
2019-10-22 22:53:33 -04:00