Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated create-next-app docs to include pnpm usage #35755

Merged
merged 3 commits into from Mar 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions contributing.md
Expand Up @@ -246,6 +246,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example DIRECTORY_NAME DIRECTORY_NAME-app
# or
yarn create next-app --example DIRECTORY_NAME DIRECTORY_NAME-app
# or
pnpm create next-app -- --example DIRECTORY_NAME DIRECTORY_NAME-app
```

Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
Expand Down
4 changes: 4 additions & 0 deletions docs/api-reference/create-next-app.md
Expand Up @@ -10,6 +10,8 @@ The easiest way to get started with Next.js is by using `create-next-app`. This
npx create-next-app@latest
# or
yarn create next-app
# or
pnpm create next-app
```

You can create a [TypeScript project](https://github.com/vercel/next.js/blob/canary/docs/basic-features/typescript.md) with the `--ts, --typescript` flag:
Expand All @@ -18,6 +20,8 @@ You can create a [TypeScript project](https://github.com/vercel/next.js/blob/can
npx create-next-app@latest --ts
# or
yarn create next-app --typescript
# or
pnpm create next-app -- --ts
```

### Options
Expand Down
2 changes: 2 additions & 0 deletions docs/basic-features/typescript.md
Expand Up @@ -27,6 +27,8 @@ You can create a TypeScript project with [`create-next-app`](https://nextjs.org/
npx create-next-app@latest --ts
# or
yarn create next-app --typescript
# or
pnpm create next-app -- --ts
```

## Existing projects
Expand Down
4 changes: 4 additions & 0 deletions docs/getting-started.md
Expand Up @@ -25,6 +25,8 @@ We recommend creating a new Next.js app using `create-next-app`, which sets up e
npx create-next-app@latest
# or
yarn create next-app
# or
pnpm create next-app
```

If you want to start with a TypeScript project you can use the `--typescript` flag:
Expand All @@ -33,6 +35,8 @@ If you want to start with a TypeScript project you can use the `--typescript` fl
npx create-next-app@latest --typescript
# or
yarn create next-app --typescript
# or
pnpm create next-app -- --typescript
```

After the installation is complete:
Expand Down
2 changes: 2 additions & 0 deletions examples/active-class-name/README.md
Expand Up @@ -16,6 +16,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example active-class-name active-class-name-app
# or
yarn create next-app --example active-class-name active-class-name-app
# or
pnpm create next-app -- --example active-class-name active-class-name-app
```

Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
2 changes: 2 additions & 0 deletions examples/amp-first/README.md
Expand Up @@ -21,6 +21,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example amp-first amp-first-app
# or
yarn create next-app --example amp-first amp-first-app
# or
pnpm create next-app -- --example amp-first amp-first-app
```

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.
Expand Down
2 changes: 2 additions & 0 deletions examples/amp-story/README.md
Expand Up @@ -16,6 +16,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example amp-story amp-story-app
# or
yarn create next-app --example amp-story amp-story-app
# or
pnpm create next-app -- --example amp-story amp-story-app
```

Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
2 changes: 2 additions & 0 deletions examples/amp/README.md
Expand Up @@ -16,6 +16,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example amp amp-app
# or
yarn create next-app --example amp amp-app
# or
pnpm create next-app -- --example amp amp-app
```

Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
2 changes: 2 additions & 0 deletions examples/analyze-bundles/README.md
Expand Up @@ -16,6 +16,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example analyze-bundles analyze-bundles-app
# or
yarn create next-app --example analyze-bundles analyze-bundles-app
# or
pnpm create next-app -- --example analyze-bundles analyze-bundles-app
```

### Analyze webpack output
Expand Down
2 changes: 2 additions & 0 deletions examples/api-routes-apollo-server-and-client-auth/README.md
Expand Up @@ -18,6 +18,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example api-routes-apollo-server-and-client-auth api-routes-apollo-server-and-client-auth-app
# or
yarn create next-app --example api-routes-apollo-server-and-client-auth api-routes-apollo-server-and-client-auth-app
# or
pnpm create next-app -- --example api-routes-apollo-server-and-client-auth api-routes-apollo-server-and-client-auth-app
```

Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
2 changes: 2 additions & 0 deletions examples/api-routes-apollo-server-and-client/README.md
Expand Up @@ -18,6 +18,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example api-routes-apollo-server-and-client api-routes-apollo-server-and-client-app
# or
yarn create next-app --example api-routes-apollo-server-and-client api-routes-apollo-server-and-client-app
# or
pnpm create next-app -- --example api-routes-apollo-server-and-client api-routes-apollo-server-and-client-app
```

Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
2 changes: 2 additions & 0 deletions examples/api-routes-apollo-server/README.md
Expand Up @@ -16,6 +16,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example api-routes-apollo-server api-routes-apollo-server-app
# or
yarn create next-app --example api-routes-apollo-server api-routes-apollo-server-app
# or
pnpm create next-app -- --example api-routes-apollo-server api-routes-apollo-server-app
```

Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
Expand Down
2 changes: 2 additions & 0 deletions examples/api-routes-cors/README.md
Expand Up @@ -18,6 +18,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example api-routes-cors api-routes-cors-app
# or
yarn create next-app --example api-routes-cors api-routes-cors-app
# or
pnpm create next-app -- --example api-routes-cors api-routes-cors-app
```

Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
2 changes: 2 additions & 0 deletions examples/api-routes-graphql/README.md
Expand Up @@ -16,6 +16,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example api-routes-graphql api-routes-graphql-app
# or
yarn create next-app --example api-routes-graphql api-routes-graphql-app
# or
pnpm create next-app -- --example api-routes-graphql api-routes-graphql-app
```

Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
2 changes: 2 additions & 0 deletions examples/api-routes-middleware/README.md
Expand Up @@ -16,6 +16,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example api-routes-middleware api-routes-middleware-app
# or
yarn create next-app --example api-routes-middleware api-routes-middleware-app
# or
pnpm create next-app -- --example api-routes-middleware api-routes-middleware-app
```

Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
2 changes: 2 additions & 0 deletions examples/api-routes-rate-limit/README.md
Expand Up @@ -30,6 +30,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example api-routes-rate-limit api-routes-rate-limit-app
# or
yarn create next-app --example api-routes-rate-limit api-routes-rate-limit-app
# or
pnpm create next-app -- --example api-routes-rate-limit api-routes-rate-limit-app
```

Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
2 changes: 2 additions & 0 deletions examples/api-routes-rest/README.md
Expand Up @@ -16,6 +16,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example api-routes-rest api-routes-rest-app
# or
yarn create next-app --example api-routes-rest api-routes-rest-app
# or
pnpm create next-app -- --example api-routes-rest api-routes-rest-app
```

### Deploy to Vercel
Expand Down
2 changes: 2 additions & 0 deletions examples/api-routes/README.md
Expand Up @@ -16,6 +16,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example api-routes api-routes-app
# or
yarn create next-app --example api-routes api-routes-app
# or
pnpm create next-app -- --example api-routes api-routes-app
```

Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
2 changes: 2 additions & 0 deletions examples/auth0/README.md
Expand Up @@ -19,6 +19,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example auth0 auth0-app
# or
yarn create next-app --example auth0 auth0-app
# or
pnpm create next-app -- --example auth0 auth0-app
```

## Configuring Auth0
Expand Down
2 changes: 2 additions & 0 deletions examples/basic-css/README.md
Expand Up @@ -16,6 +16,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example basic-css basic-css-app
# or
yarn create next-app --example basic-css basic-css-app
# or
pnpm create next-app -- --example basic-css basic-css-app
```

Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
2 changes: 2 additions & 0 deletions examples/basic-export/README.md
Expand Up @@ -16,6 +16,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example basic-export basic-export-app
# or
yarn create next-app --example basic-export basic-export-app
# or
pnpm create next-app -- --example basic-export basic-export-app
```

Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
2 changes: 2 additions & 0 deletions examples/blog-starter-typescript/README.md
Expand Up @@ -22,6 +22,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example blog-starter-typescript blog-starter-typescript-app
# or
yarn create next-app --example blog-starter-typescript blog-starter-typescript-app
# or
pnpm create next-app -- --example blog-starter-typescript blog-starter-typescript-app
```

Your blog should be up and running on [http://localhost:3000](http://localhost:3000)! If it doesn't work, post on [GitHub discussions](https://github.com/vercel/next.js/discussions).
Expand Down
2 changes: 2 additions & 0 deletions examples/blog-starter/README.md
Expand Up @@ -47,6 +47,8 @@ or

```
yarn create next-app --example blog-starter blog-starter-app
# or
pnpm create next-app -- --example blog-starter blog-starter-app

```

Expand Down
2 changes: 2 additions & 0 deletions examples/blog/README.md
Expand Up @@ -31,6 +31,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example blog my-blog
# or
yarn create next-app --example blog my-blog
# or
pnpm create next-app -- --example blog my-blog
```

Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
2 changes: 2 additions & 0 deletions examples/catch-all-routes/README.md
Expand Up @@ -25,6 +25,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example catch-all-routes catch-all-routes-app
# or
yarn create next-app --example catch-all-routes catch-all-routes-app
# or
pnpm create next-app -- --example catch-all-routes catch-all-routes-app
```

Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
2 changes: 2 additions & 0 deletions examples/cms-agilitycms/README.md
Expand Up @@ -42,6 +42,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example cms-agilitycms cms-agilitycms-app
# or
yarn create next-app --example cms-agilitycms cms-agilitycms-app
# or
pnpm create next-app -- --example cms-agilitycms cms-agilitycms-app
```

## Configuration
Expand Down
2 changes: 2 additions & 0 deletions examples/cms-builder-io/README.md
Expand Up @@ -14,6 +14,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example cms-builder-io cms-builder-io-app
# or
yarn create next-app --example cms-builder-io cms-builder-io-app
# or
pnpm create next-app -- --example cms-builder-io cms-builder-io-app
```

## Configuration
Expand Down
2 changes: 2 additions & 0 deletions examples/cms-buttercms/README.md
Expand Up @@ -39,6 +39,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example cms-buttercms cms-buttercms-app
# or
yarn create next-app --example cms-buttercms cms-buttercms-app
# or
pnpm create next-app -- --example cms-buttercms cms-buttercms-app
```

## Configuration
Expand Down
2 changes: 2 additions & 0 deletions examples/cms-contentful/README.md
Expand Up @@ -39,6 +39,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example cms-contentful cms-contentful-app
# or
yarn create next-app --example cms-contentful cms-contentful-app
# or
pnpm create next-app -- --example cms-contentful cms-contentful-app
```

## Configuration
Expand Down
2 changes: 2 additions & 0 deletions examples/cms-cosmic/README.md
Expand Up @@ -39,6 +39,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example cms-cosmic cms-cosmic-app
# or
yarn create next-app --example cms-cosmic cms-cosmic-app
# or
pnpm create next-app -- --example cms-cosmic cms-cosmic-app
```

## Configuration
Expand Down
2 changes: 2 additions & 0 deletions examples/cms-datocms/README.md
Expand Up @@ -39,6 +39,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example cms-datocms cms-datocms-app
# or
yarn create next-app --example cms-datocms cms-datocms-app
# or
pnpm create next-app -- --example cms-datocms cms-datocms-app
```

## Configuration
Expand Down
2 changes: 2 additions & 0 deletions examples/cms-drupal/README.md
Expand Up @@ -38,6 +38,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example cms-drupal cms-drupal-app
# or
yarn create next-app --example cms-drupal cms-drupal-app
# or
pnpm create next-app -- --example cms-drupal cms-drupal-app
```

## Setup Drupal
Expand Down
2 changes: 2 additions & 0 deletions examples/cms-ghost/README.md
Expand Up @@ -37,6 +37,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example cms-ghost cms-ghost-app
# or
yarn create next-app --example cms-ghost cms-ghost-app
# or
pnpm create next-app -- --example cms-ghost cms-ghost-app
```

### Setp 1. Run Next.js in development mode
Expand Down
2 changes: 2 additions & 0 deletions examples/cms-graphcms/README.md
Expand Up @@ -42,6 +42,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example cms-graphcms cms-graphcms-app
# or
yarn create next-app --example cms-graphcms cms-graphcms-app
# or
pnpm create next-app -- --example cms-graphcms cms-graphcms-app
```

## Configuration
Expand Down
2 changes: 2 additions & 0 deletions examples/cms-kontent/README.md
Expand Up @@ -39,6 +39,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example cms-kontent cms-kontent-app
# or
yarn create next-app --example cms-kontent cms-kontent-app
# or
pnpm create next-app -- --example cms-kontent cms-kontent-app
```

## Configuration
Expand Down
2 changes: 2 additions & 0 deletions examples/cms-prepr/README.md
Expand Up @@ -41,6 +41,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example cms-prepr cms-prepr-app
# or
yarn create next-app --example cms-prepr cms-prepr-app
# or
pnpm create next-app -- --example cms-prepr cms-prepr-app
```

## Configuration
Expand Down
2 changes: 2 additions & 0 deletions examples/cms-prismic/README.md
Expand Up @@ -38,6 +38,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example cms-prismic cms-prismic-app
# or
yarn create next-app --example cms-prismic cms-prismic-app
# or
pnpm create next-app -- --example cms-prismic cms-prismic-app
```

## Configuration
Expand Down
2 changes: 2 additions & 0 deletions examples/cms-sanity/README.md
Expand Up @@ -45,6 +45,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example cms-sanity cms-sanity-app
# or
yarn create next-app --example cms-sanity cms-sanity-app
# or
pnpm create next-app -- --example cms-sanity cms-sanity-app
```

## Configuration
Expand Down
2 changes: 2 additions & 0 deletions examples/cms-storyblok/README.md
Expand Up @@ -39,6 +39,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example cms-storyblok cms-storyblok-app
# or
yarn create next-app --example cms-storyblok cms-storyblok-app
# or
pnpm create next-app -- --example cms-storyblok cms-storyblok-app
```

## Configuration
Expand Down
2 changes: 2 additions & 0 deletions examples/cms-strapi/README.md
Expand Up @@ -39,6 +39,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example cms-strapi cms-strapi-app
# or
yarn create next-app --example cms-strapi cms-strapi-app
# or
pnpm create next-app -- --example cms-strapi cms-strapi-app
```

## Configuration
Expand Down
2 changes: 2 additions & 0 deletions examples/cms-takeshape/README.md
Expand Up @@ -38,6 +38,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example cms-takeshape cms-takeshape-app
# or
yarn create next-app --example cms-takeshape cms-takeshape-app
# or
pnpm create next-app -- --example cms-takeshape cms-takeshape-app
```

## Configuration
Expand Down
2 changes: 2 additions & 0 deletions examples/cms-tina/README.md
Expand Up @@ -31,6 +31,8 @@ Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packag
npx create-next-app --example cms-tina cms-tina-app
# or
yarn create next-app --example cms-ghost cms-tina-app
# or
pnpm create next-app -- --example cms-ghost cms-tina-app
```

### Setp 1. Run Next.js in development mode
Expand Down