* Add licences to all example/package.json that lack them
* Revert "Add licences to all example/package.json that lack them"
This reverts commit 5d4e25012f7334772b8ef5924bc355277e827cba.
* Update check-examples to remove `license` field from examples
* Remove `license` from all examples.
This was mentioned in vercel/next.js#27121 but it looks like it didn't end up being in the merge?
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Clean up package.json files in the `examples` directory:
- Add `private: true`
- Remove `version` (because they are irrelevant for packages that are not meant to be published)
- Remove `name` (because they are optional for packages that are not meant to be published, and when someone clones an example, they often rename it and the property becomes stale)
- Remove `author`
- Remove `description`
- Remove `license`
Also remove `with-dynamic-app-layout` example completely, since it does the same as `layout-component` (https://github.com/vercel/next.js/pull/27121#discussion_r668178408).
## Documentation / Examples
- [x] Make sure the linting passes
[With next 11 requiring react 17](https://nextjs.org/blog/next-11#upgrade-guide), most of the examples
need to be updated, so the following snippet updated all the examples to
a compatible react version.
```bash
cd examples/
fd -g 'package.json' | xargs sed -r -i 's/"react": ".*"/"react": "^17.0.2"/
fd -g 'package.json' | xargs sed -r -i 's/"react-dom": ".*"/"react-dom": "^17.0.2"/'
# exclude experimental react version
git checkout with-reason-relay/package.json
```
**What's the problem this PR addresses?**
A decent amount of the examples don't have a `name` field in `package.json` that matches their folder name, meaning they either lack a name or the names are duplicated.
I was testing Yarn 2 workspaces using the entire examples directory and needed to get rid of the duplicates.
**How did you fix it?**
Updated the names to match the names of their folders
* Remove getInitialProps
* added swr
* Update examples/with-cookie-auth-fauna/pages/profile.js
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
* Update examples/with-cookie-auth-fauna/pages/profile.js
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
* no longer needed
* new .env support
* redirect if not found
* always use latest next version
* no longer needed
* Updated readme
* Updated profile page
* Fixed readme and added deploy button
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
* 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>