Skip to content

Commit

Permalink
Merge branch 'canary' into examples/with-chakra-ui-typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasdisk authored Aug 30, 2020
2 parents 69d508b + f17d435 commit 5bb2d6d
Show file tree
Hide file tree
Showing 468 changed files with 1,253 additions and 4,607 deletions.
16 changes: 16 additions & 0 deletions check-examples.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

cd `dirname $0`

for folder in examples/* ; do
cp -n packages/create-next-app/templates/default/gitignore $folder/.gitignore;
if [ -f "$folder/package.json" ]; then
cat $folder/package.json | jq '.license = "MIT"' | sponge $folder/package.json
fi
done;

if [[ ! -z $(git status -s) ]];then
echo "Detected changes"
git status
exit 1
fi
13 changes: 0 additions & 13 deletions check-git-ignore.sh

This file was deleted.

21 changes: 0 additions & 21 deletions contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ Deploy the example using [Vercel](https://vercel.com/now):

## How to use

### Using `create-next-app`

Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example:

```bash
Expand All @@ -148,24 +146,5 @@ npx create-next-app --example DIRECTORY_NAME DIRECTORY_NAME-app
yarn create next-app --example DIRECTORY_NAME DIRECTORY_NAME-app
```

### Download manually

Download the example:

```bash
curl https://codeload.github.com/vercel/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/DIRECTORY_NAME
cd DIRECTORY_NAME
```

Install it and run:

```bash
npm install
npm run dev
# or
yarn
yarn dev
```

Deploy it to the cloud with [Vercel](https://vercel.com/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
````
4 changes: 3 additions & 1 deletion docs/advanced-features/measuring-performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ export function reportWebVitals(metric) {
>
> ```js
> export function reportWebVitals({ id, name, label, value }) {
> ga('send', 'event', {
> // Use `window.gtag` if you initialized Google Analytics as this example:
> // https://github.com/vercel/next.js/blob/canary/examples/with-google-analytics/pages/_document.js
> window.gtag('send', 'event', {
> eventCategory:
> label === 'web-vital' ? 'Web Vitals' : 'Next.js custom metric',
> eventAction: name,
Expand Down
1 change: 1 addition & 0 deletions docs/api-reference/next/link.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ description: Enable client-side transitions between routes with the built-in Lin
<summary><b>Examples</b></summary>
<ul>
<li><a href="https://github.com/vercel/next.js/tree/canary/examples/hello-world">Hello World</a></li>
<li><a href="https://github.com/vercel/next.js/tree/canary/examples/active-class-name">Active className on Link</a></li>
</ul>
</details>

Expand Down
2 changes: 1 addition & 1 deletion docs/basic-features/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Next.js will automatically configure this file with default values. Providing yo

> Next.js uses Babel to handle TypeScript, which has some [caveats](https://babeljs.io/docs/en/babel-plugin-transform-typescript#caveats), and some [compiler options are handled differently](https://babeljs.io/docs/en/babel-plugin-transform-typescript#typescript-compiler-options).
Then, run `next` (normally `npm run dev`) and Next.js will guide you through the installation of the required packages to finish the setup:
Then, run `next` (normally `npm run dev` or `yarn dev`) and Next.js will guide you through the installation of the required packages to finish the setup:

```bash
npm run dev
Expand Down
4 changes: 3 additions & 1 deletion docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ Install `next`, `react` and `react-dom` in your project:

```bash
npm install next react react-dom
# or
yarn add next react react-dom
```

Open `package.json` and add the following `scripts`:
Expand Down Expand Up @@ -71,7 +73,7 @@ function HomePage() {
export default HomePage
```

To start developing your application run `npm run dev`. This starts the development server on `http://localhost:3000`.
To start developing your application run `npm run dev` or `yarn dev`. This starts the development server on `http://localhost:3000`.

Visit `http://localhost:3000` to view your application.

Expand Down
21 changes: 0 additions & 21 deletions examples/active-class-name/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ Deploy the example using [Vercel](https://vercel.com):

## How to use

### Using `create-next-app`

Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example:

```bash
Expand All @@ -20,23 +18,4 @@ npx create-next-app --example active-class-name active-class-name-app
yarn create next-app --example active-class-name active-class-name-app
```

### Download manually

Download the example:

```bash
curl https://codeload.github.com/vercel/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/active-class-name
cd active-class-name
```

Install it and run:

```bash
npm install
npm run dev
# or
yarn
yarn dev
```

Deploy it to the cloud with [Vercel](https://vercel.com/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
2 changes: 1 addition & 1 deletion examples/active-class-name/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
"react": "^16.7.0",
"react-dom": "^16.7.0"
},
"license": "ISC"
"license": "MIT"
}
21 changes: 0 additions & 21 deletions examples/amp-first/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ Deploy the example using [Vercel](https://vercel.com):

## How to use

### Using `create-next-app`

Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example:

```bash
Expand All @@ -25,25 +23,6 @@ npx create-next-app --example amp-first amp-first-app
yarn create next-app --example amp-first amp-first-app
```

### Download manually

Download the example:

```bash
curl https://codeload.github.com/vercel/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/amp-first
cd amp-first
```

Install it and run:

```bash
npm install
npm run dev
# or
yarn
yarn dev
```

Open [http://localhost:3000](http://localhost:3000) to view it in the browser. The page will reload if you make edits. You will also see AMP validation errors in the console.

## Todo
Expand Down
2 changes: 1 addition & 1 deletion examples/amp-first/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
"react": "^16.10.2",
"react-dom": "^16.10.2"
},
"license": "ISC"
"license": "MIT"
}
21 changes: 0 additions & 21 deletions examples/amp-story/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ Deploy the example using [Vercel](https://vercel.com):

## How to use

### Using `create-next-app`

Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example:

```bash
Expand All @@ -20,23 +18,4 @@ npx create-next-app --example amp-story amp-app
yarn create next-app --example amp-story amp-app
```

### Download manually

Download the example:

```bash
curl https://codeload.github.com/vercel/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/amp-story
cd amp-story
```

Install it and run:

```bash
npm install
npm run dev
# or
yarn
yarn dev
```

Deploy it to the cloud with [Vercel](https://vercel.com/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
2 changes: 1 addition & 1 deletion examples/amp-story/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
"react": "^16.7.0",
"react-dom": "^16.7.0"
},
"license": "ISC"
"license": "MIT"
}
21 changes: 0 additions & 21 deletions examples/amp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ Deploy the example using [Vercel](https://vercel.com):

## How to use

### Using `create-next-app`

Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example:

```bash
Expand All @@ -20,23 +18,4 @@ npx create-next-app --example amp amp-app
yarn create next-app --example amp amp-app
```

### Download manually

Download the example:

```bash
curl https://codeload.github.com/vercel/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/amp
cd amp
```

Install it and run:

```bash
npm install
npm run dev
# or
yarn
yarn dev
```

Deploy it to the cloud with [Vercel](https://vercel.com/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
2 changes: 1 addition & 1 deletion examples/amp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
"react": "^16.7.0",
"react-dom": "^16.7.0"
},
"license": "ISC"
"license": "MIT"
}
21 changes: 0 additions & 21 deletions examples/analyze-bundles/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ Deploy the example using [Vercel](https://vercel.com):

## How to use

### Using `create-next-app`

Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example:

```bash
Expand All @@ -20,25 +18,6 @@ npx create-next-app --example analyze-bundles analyze-bundles-app
yarn create next-app --example analyze-bundles analyze-bundles-app
```

### Download manually

Download the example:

```bash
curl https://codeload.github.com/vercel/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/analyze-bundles
cd analyze-bundles
```

Install it

```bash
npm install
npm run dev
# or
yarn
yarn dev
```

### Analyze webpack output

To analyze your webpack output, invoke the following command:
Expand Down
2 changes: 1 addition & 1 deletion examples/analyze-bundles/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
"react": "^16.8.0",
"react-dom": "^16.8.0"
},
"license": "ISC"
"license": "MIT"
}
21 changes: 0 additions & 21 deletions examples/api-routes-apollo-server-and-client-auth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ In this simple example, we integrate Apollo seamlessly with [Next.js data fetchi

## How to use

### Using `create-next-app`

Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) or [npx](https://github.com/zkat/npx#readme) to bootstrap the example:

```bash
Expand All @@ -16,23 +14,4 @@ npx create-next-app --example api-routes-apollo-server-and-client-auth api-route
yarn create next-app --example api-routes-apollo-server-and-client-auth api-routes-apollo-server-and-client-auth-app
```

### Download manually

Download the example:

```bash
curl https://codeload.github.com/vercel/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/api-routes-apollo-server-and-client-auth
cd api-routes-apollo-server-and-client-auth
```

Install it and run:

```bash
npm install
npm run dev
# or
yarn
yarn dev
```

Deploy it to the cloud with [Vercel](https://vercel.com/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
"react-dom": "^16.7.0",
"uuid": "8.1.0"
},
"license": "ISC"
"license": "MIT"
}
21 changes: 0 additions & 21 deletions examples/api-routes-apollo-server-and-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ In this simple example, we integrate Apollo seamlessly with [Next.js data fetchi

## How to use

### Using `create-next-app`

Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example:

```bash
Expand All @@ -16,23 +14,4 @@ npx create-next-app --example api-routes-apollo-server-and-client api-routes-apo
yarn create next-app --example api-routes-apollo-server-and-client api-routes-apollo-server-and-client-app
```

### Download manually

Download the example:

```bash
curl https://codeload.github.com/vercel/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/api-routes-apollo-server-and-client
cd api-routes-apollo-server-and-client
```

Install it and run:

```bash
npm install
npm run dev
# or
yarn
yarn dev
```

Deploy it to the cloud with [Vercel](https://vercel.com/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
2 changes: 1 addition & 1 deletion examples/api-routes-apollo-server-and-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
"react": "^16.7.0",
"react-dom": "^16.7.0"
},
"license": "ISC"
"license": "MIT"
}
Loading

0 comments on commit 5bb2d6d

Please sign in to comment.