Commit 87ab61eb authored by Bonggyun Lee's avatar Bonggyun Lee Committed by Sergio Xalambrí

example/with-typescript (#3698)

* example/with-typescript2

* apply standard js style

* remove unnecessary file & code

* fix link url

* replace with-typescript
parent 9404beb1
...@@ -31,4 +31,3 @@ npm install ...@@ -31,4 +31,3 @@ npm install
npm run dev npm run dev
``` ```
Output JS files are aside the related TypeScript ones.
const withTypescript = require('@zeit/next-typescript')
module.exports = withTypescript()
{ {
"name": "with-typescript", "name": "with-typescript-plugin",
"version": "1.0.0", "version": "1.0.0",
"scripts": { "scripts": {
"dev": "concurrently \"tsc --pretty --watch\" \"next\"", "dev": "next",
"prebuild": "tsc",
"build": "next build", "build": "next build",
"start": "next start" "start": "next start"
}, },
"dependencies": { "dependencies": {
"next": "latest", "next": "^5.0.0",
"react": "^16.1.0", "react": "^16.2.0",
"react-dom": "^16.1.0" "react-dom": "^16.2.0"
}, },
"devDependencies": { "devDependencies": {
"@types/next": "^2.4.5", "@types/next": "^2.4.7",
"@types/react": "^16.0.22", "@types/react": "^16.0.36",
"concurrently": "^3.5.0", "@zeit/next-typescript": "0.0.8",
"tslint": "^5.8.0", "typescript": "^2.7.1"
"typescript": "^2.6.1"
} }
} }
{ {
"compileOnSave": false,
"compilerOptions": { "compilerOptions": {
"jsx": "react-native", "target": "esnext",
"module": "commonjs", "module": "esnext",
"strict": true, "allowJs": true,
"target": "es2017" "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"
]
} }
} }
{
"defaultSeverity": "error",
"extends": ["tslint:recommended"],
"jsRules": {},
"rules": {
"quotemark": [true, "single", "jsx-double"],
"semicolon": [true, "never"]
},
"rulesDirectory": []
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment