1
0
Fork 0
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:
Bonggyun Lee 2018-02-07 01:06:48 +09:00 committed by Sergio Xalambrí
parent 9404beb12f
commit 87ab61eba5
6 changed files with 32 additions and 27 deletions

View file

@ -1 +0,0 @@
*.js

View file

@ -31,4 +31,3 @@ npm install
npm run dev
```
Output JS files are aside the related TypeScript ones.

View file

@ -0,0 +1,2 @@
const withTypescript = require('@zeit/next-typescript')
module.exports = withTypescript()

View file

@ -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"
}
}

View file

@ -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"
]
}
}

View file

@ -1,10 +0,0 @@
{
"defaultSeverity": "error",
"extends": ["tslint:recommended"],
"jsRules": {},
"rules": {
"quotemark": [true, "single", "jsx-double"],
"semicolon": [true, "never"]
},
"rulesDirectory": []
}