diff --git a/examples/with-typescript/.gitignore b/examples/with-typescript/.gitignore deleted file mode 100644 index a6c7c285..00000000 --- a/examples/with-typescript/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.js diff --git a/examples/with-typescript/README.md b/examples/with-typescript/README.md index 3ccfe2b1..bb1a408e 100644 --- a/examples/with-typescript/README.md +++ b/examples/with-typescript/README.md @@ -31,4 +31,3 @@ npm install npm run dev ``` -Output JS files are aside the related TypeScript ones. diff --git a/examples/with-typescript/next.config.js b/examples/with-typescript/next.config.js new file mode 100644 index 00000000..d8b638bd --- /dev/null +++ b/examples/with-typescript/next.config.js @@ -0,0 +1,2 @@ +const withTypescript = require('@zeit/next-typescript') +module.exports = withTypescript() diff --git a/examples/with-typescript/package.json b/examples/with-typescript/package.json index 5311bd17..cf30b7f6 100644 --- a/examples/with-typescript/package.json +++ b/examples/with-typescript/package.json @@ -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" } } diff --git a/examples/with-typescript/tsconfig.json b/examples/with-typescript/tsconfig.json index 804cc32c..4ce1dc5d 100644 --- a/examples/with-typescript/tsconfig.json +++ b/examples/with-typescript/tsconfig.json @@ -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" + ] } } diff --git a/examples/with-typescript/tslint.json b/examples/with-typescript/tslint.json deleted file mode 100644 index 63f35ccc..00000000 --- a/examples/with-typescript/tslint.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "defaultSeverity": "error", - "extends": ["tslint:recommended"], - "jsRules": {}, - "rules": { - "quotemark": [true, "single", "jsx-double"], - "semicolon": [true, "never"] - }, - "rulesDirectory": [] -}