Commit graph

66 commits

Author SHA1 Message Date
Dominic Elm
d2caaeab64
docs: add 'Open in StackBlitz' buttons to various examples (#25853)
This PR adds a `Preview` section and a `Open in StackBlitz` button to various examples. I have tested all examples and omitted the ones that require third party API keys, or didn't work. Some examples don't work locally either.

Here's an example:
![image](https://user-images.githubusercontent.com/12571019/121027783-88971280-c7a7-11eb-851a-0ad30cf74b42.png)

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [x] Examples updated
- [ ] Telemetry added. In case of a feature if it's used or not.

## Documentation / Examples

- [x] Make sure the linting passes
2021-06-08 20:45:02 +00:00
Holiq Ibrahim
0a31a92a3c
fix respomsive example tailwind (#24582)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-05-18 16:17:21 -05:00
Pranav P
cffdf1e088
Update tailwind css to v2.1 with jit support (#23793)
## Documentation / Examples

- [x] Make sure the linting passes
2021-04-08 16:52:15 +00:00
Mokshit Jain
aaa999d696
Make @tailwindcss/jit default engine for Tailwind CSS (#23192)
This Pull Request makes [`@tailwindcss/jit`](https://github.com/tailwindlabs/tailwindcss-jit) the default engine for Tailwind CSS.

It has the following advantages:
- Lightning-fast build times because the CSS is generated on demand.
- Every variant is enabled out of the box.
- Generate arbitrary styles without writing custom CSS.
- Better performance in browser dev-tools.
2021-03-18 15:57:31 +00:00
Nabil Boussouf
371aa608b2
Install tailwindcss as a development dependency (#22964)
Set tailwindcss as a development dependency https://tailwindcss.com/docs/guides/nextjs#install-tailwind-via-npm
2021-03-11 14:16:36 +00:00
Rafael Laurindo
984a78d545
Update React version in Tailwind example (#21906)
This PR updates the React packages version in the example with Tailwind.
Thus solving the new version notice when starting the project in dev.

Notice screenshot: 📸 
![image](https://user-images.githubusercontent.com/25041169/107084102-5bc0f780-67d5-11eb-82bb-b9ea2682ec5c.png)

Now with the updated version:📸 
![image](https://user-images.githubusercontent.com/25041169/107084154-71ceb800-67d5-11eb-95c9-54ea534145dd.png)
2021-02-05 20:29:20 +00:00
Lee Robinson
5a73859fe8
Update docs and Create Next App to use API Middlewares by default. (#21639) 2021-01-28 23:34:03 +00:00
Dominik Felber
1dc430883e
Update dependencies of with-tailwindcss example (#21517) 2021-01-25 12:10:32 -05:00
Nick Carchedi
379c4c4e33
Bring Tailwind CSS example in line with official Tailwind docs (#19750)
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: Tim Neutkens <timneutkens@me.com>
2021-01-25 14:20:14 +01:00
Luis Alvarez D
e28fd50441
Include utm_source on example links to vercel.com (#21305) 2021-01-19 07:28:54 +00:00
Michael McQuade
8d7e7d526c
Update PostCSS plugin list in README (#20956) 2021-01-11 10:27:21 +01: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
Jesse Jafa
556ab4f169
Upgrade Tailwindcss to 2.0.2 (#20517)
Normally I wouldn't make a PR for a minor version upgrade, but the 2.0.2 version contains some important performance improvements.
https://github.com/tailwindlabs/tailwindcss/pull/3032
2020-12-28 17:36:32 +00:00
Yuri Yakovlev
0c38922525
Update Tailwind example to v2.0 (#19278)
- Bump the Tailwind version to v2.0
- Add necessary latest `postcss` and `autoprefixer` deps
- Clean the tw config a bit
- Add dark mode styles
2020-11-20 18:18:49 +00:00
Henrik Wenz
1c4aecbeaf
Improve with-tailwindcss example (#17742)
## Change

To opt-in to using the new layers mode by default.

## Motivation

- Reduces CSS filesize
- Prevents users from using the already deprecated old layers mode
- Removes the following console warnings:

```log
risk - There are upcoming breaking changes: purgeLayersByDefault
risk - We highly recommend opting-in to these changes now to simplify upgrading Tailwind in the future.
risk - https://tailwindcss.com/docs/upcoming-changes
```

[more info](https://tailwindcss.com/docs/upcoming-changes)
2020-10-12 16:37:56 +00:00
Tim Feeley
b009ebbec6
Fix a small typo in index.css (#17399) 2020-09-27 22:17:03 +00: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
Vic Vijayakumar
48b3f8e899
Update with-tailwindcss example (#16370)
Updated `examples/with-tailwindcss` to the newest TailwindCSS, and opted in to future-facing breaking changes.

Also created a jsconfig.json so that files can be imported without traversing up relative paths.
2020-08-27 23:54:12 +00:00
Luis Alvarez D
63ea2d8297
Add CSS Modules examples to docs (#15601)
Fixes https://github.com/vercel/next.js/issues/15595

- Updated the tailwindcss and tailwindcss-emotion examples to the latest version of tailwindcss
- Added a new `with-styled-jsx` example
- Updated the `basic-css` example to use CSS Modules instead of styled-jsx
- Added the examples to the documentation page for built-in css support
2020-07-29 14:43:48 +00: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
S M Mahmudul Hasan
09b2a66f49
Tailwind config: also look for .tsx .jsx and .ts (#14621)
Closes: #14595
2020-06-27 11:08:10 +00: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
Taylor Bryant
5e80999c04
Clean up styles in with-tailwindcss example (#12458) 2020-05-03 19:45:57 -04:00
Taylor Bryant
a59a15dd78
Add name to component in with-tailwindcss example (#12417) 2020-05-02 15:08:23 -04:00
Taylor Bryant
0050432690
Update with-tailwindcss to use Tailwind CSS v1.4.0's new built-in purge option (#12327) 2020-04-30 09:51:37 +02: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
Paul van Dyk
19f41c60bc
Update postcss.config.js (#11366)
* Update postcss.config.js

Return empty array if the condition is not met to avoid a null/undefined PostCSS plugin.

* Update postcss.config.js

Fix array spread

* Update postcss.config.js

remove extra operator

* Fix linting

Co-authored-by: Tim Neutkens <timneutkens@me.com>
2020-04-06 12:06:06 +02: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
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
Zhe Zhang
0b1217e79e Update with-tailwindcss example (#10141)
Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-17 16:02:38 -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
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
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
7edf0da0c4 Add the deploy button to compatible examples (#9547) 2019-11-27 11:40:58 -05: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
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
Joe Haddad
6b54e9ed66 Fix Prettier Commit Hook (#9245)
* Apply format to webpack config

* hit all files
2019-10-30 12:35:51 +01: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
Luis Alvarez D
f10f3304fe Replace the deprecated Create Next App URL (#9032) 2019-10-10 23:34:14 -04:00
Henrik Wenz
a9325f123a Remove prefetch attributes from examples (#8481)
* Remove prefetch from with-apollo-and-redux-saga example

Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated

* Remove prefetch from using-inferno example

Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated

* Remove prefetch from with-apollo-and-redux example

Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated

* Remove prefetch from with-apollo-auth example

Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated

* Remove prefetch from with-tailwindcss example

Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated

* Remove prefetch from with-graphql-hooks example

Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated

* Remove prefetch from data-fetch example

Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated
2019-08-23 10:12:25 -04:00
Henrik Wenz
7eda3bc632 Fix invalid href with-tailwindcss example (#8488)
Uncaught (in promise) Error: Invalid href passed to router: https://github.com/zeit/next.js https://err.sh/zeit/next.js/invalid-href-passed
2019-08-23 09:39:46 -04:00
Tim Neutkens
a90a55545b
Deprecate Container usage (#8327)
* Remove Container from examples

* Update readme to reflect Container removal
2019-08-11 22:02:33 +02:00
Joe Haddad
b3170d2648
Format missed files (#7464)
* Format missed files

* Remove unnecessary rule

* Fix type error
2019-05-29 18:19:32 -07:00
Matthew Sweeney
0cd2732c7f
Remove deploy to now button from all examples (#7101) 2019-05-27 12:22:05 -07:00
msheakoski
2c7be96daa Update Tailwind CSS to v1.0 (#7421) 2019-05-27 13:22:26 +02:00
Steven Yung
bdf8da6a23 Remove outdated "extras" section in with-tailwindcss example README (#7379) 2019-05-18 21:07:39 +02:00