mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
example/with-typescript (#3698)
* example/with-typescript2 * apply standard js style * remove unnecessary file & code * fix link url * replace with-typescript
This commit is contained in:
parent
9404beb12f
commit
87ab61eba5
1
examples/with-typescript/.gitignore
vendored
1
examples/with-typescript/.gitignore
vendored
|
@ -1 +0,0 @@
|
|||
*.js
|
|
@ -31,4 +31,3 @@ npm install
|
|||
npm run dev
|
||||
```
|
||||
|
||||
Output JS files are aside the related TypeScript ones.
|
||||
|
|
2
examples/with-typescript/next.config.js
Normal file
2
examples/with-typescript/next.config.js
Normal file
|
@ -0,0 +1,2 @@
|
|||
const withTypescript = require('@zeit/next-typescript')
|
||||
module.exports = withTypescript()
|
|
@ -1,22 +1,20 @@
|
|||
{
|
||||
"name": "with-typescript",
|
||||
"name": "with-typescript-plugin",
|
||||
"version": "1.0.0",
|
||||
"scripts": {
|
||||
"dev": "concurrently \"tsc --pretty --watch\" \"next\"",
|
||||
"prebuild": "tsc",
|
||||
"dev": "next",
|
||||
"build": "next build",
|
||||
"start": "next start"
|
||||
},
|
||||
"dependencies": {
|
||||
"next": "latest",
|
||||
"react": "^16.1.0",
|
||||
"react-dom": "^16.1.0"
|
||||
"next": "^5.0.0",
|
||||
"react": "^16.2.0",
|
||||
"react-dom": "^16.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/next": "^2.4.5",
|
||||
"@types/react": "^16.0.22",
|
||||
"concurrently": "^3.5.0",
|
||||
"tslint": "^5.8.0",
|
||||
"typescript": "^2.6.1"
|
||||
"@types/next": "^2.4.7",
|
||||
"@types/react": "^16.0.36",
|
||||
"@zeit/next-typescript": "0.0.8",
|
||||
"typescript": "^2.7.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,25 @@
|
|||
{
|
||||
"compileOnSave": false,
|
||||
"compilerOptions": {
|
||||
"jsx": "react-native",
|
||||
"module": "commonjs",
|
||||
"strict": true,
|
||||
"target": "es2017"
|
||||
"target": "esnext",
|
||||
"module": "esnext",
|
||||
"allowJs": true,
|
||||
"moduleResolution": "node",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"removeComments": false,
|
||||
"preserveConstEnums": true,
|
||||
"sourceMap": true,
|
||||
"skipLibCheck": true,
|
||||
"baseUrl": ".",
|
||||
"typeRoots": [
|
||||
"./node_modules/@types"
|
||||
],
|
||||
"lib": [
|
||||
"dom",
|
||||
"es2015",
|
||||
"es2016"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"defaultSeverity": "error",
|
||||
"extends": ["tslint:recommended"],
|
||||
"jsRules": {},
|
||||
"rules": {
|
||||
"quotemark": [true, "single", "jsx-double"],
|
||||
"semicolon": [true, "never"]
|
||||
},
|
||||
"rulesDirectory": []
|
||||
}
|
Loading…
Reference in a new issue