Skip to content

Commit 8be630d

Browse files
committed
update readme
1 parent 9d303a7 commit 8be630d

File tree

1 file changed

+1
-40
lines changed

1 file changed

+1
-40
lines changed

README.md

+1-40
Original file line numberDiff line numberDiff line change
@@ -4,47 +4,8 @@
44

55
- [AnyChart.js](https://github.com/codeBelt/my-next.js-starter/tree/anychart) - [Diff](https://github.com/codeBelt/my-next.js-starter/pull/1/files)
66
- [Material UI](https://github.com/codeBelt/my-next.js-starter/tree/material-ui) - [Diff](https://github.com/codeBelt/my-next.js-starter/pull/4/files)
7+
- [Upload Files with API Routes](https://github.com/codeBelt/my-next.js-starter/tree/upload) - [Diff](https://github.com/codeBelt/my-next.js-starter/pull/5/files)
78

89
# TypeScript Next.js example
910

1011
`npx create-next-app --example with-typescript my-next.js-starter`
11-
12-
This is a really simple project that shows the usage of Next.js with TypeScript.
13-
14-
## Deploy your own
15-
16-
Deploy the example using [Vercel](https://vercel.com):
17-
18-
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/next.js/tree/canary/examples/with-typescript)
19-
20-
## How to use it?
21-
22-
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:
23-
24-
```bash
25-
npx create-next-app --example with-typescript with-typescript-app
26-
# or
27-
yarn create next-app --example with-typescript with-typescript-app
28-
```
29-
30-
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)).
31-
32-
## Notes
33-
34-
This example shows how to integrate the TypeScript type system into Next.js. Since TypeScript is supported out of the box with Next.js, all we have to do is to install TypeScript.
35-
36-
```
37-
npm install --save-dev typescript
38-
```
39-
40-
To enable TypeScript's features, we install the type declarations for React and Node.
41-
42-
```
43-
npm install --save-dev @types/react @types/react-dom @types/node
44-
```
45-
46-
When we run `next dev` the next time, Next.js will start looking for any `.ts` or `.tsx` files in our project and builds it. It even automatically creates a `tsconfig.json` file for our project with the recommended settings.
47-
48-
Next.js has built-in TypeScript declarations, so we'll get autocompletion for Next.js' modules straight away.
49-
50-
A `type-check` script is also added to `package.json`, which runs TypeScript's `tsc` CLI in `noEmit` mode to run type-checking separately. You can then include this, for example, in your `test` scripts.

0 commit comments

Comments
 (0)