Skip to content

Commit

Permalink
Include all TS files in tsconfig.json
Browse files Browse the repository at this point in the history
This enhances editor experience.
  • Loading branch information
akheron committed Mar 18, 2022
1 parent 30cc2b4 commit aec7dc7
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"typera-openapi": "./dist/cli.js"
},
"scripts": {
"build": "tsc",
"build": "tsc -p tsconfig.build.json",
"clean": "rm -rf dist",
"lint": "eslint --max-warnings 0 '**/*.ts' && prettier --check \"**/*.{json,md}\"",
"lint:fix": "eslint --fix '**/*.ts' && prettier --write '**/*.{json,md}'",
Expand Down
6 changes: 5 additions & 1 deletion tests/middlewares.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { Middleware } from 'typera-express'
import { urlencoded } from 'body-parser'

export const formUrlEncodedMiddleware = Middleware.wrapNative<
Record<'contentType', 'application/x-www-form-urlencoded'>
>(urlencoded())
>(
// TODO: typera's typings don't like connect middleware
urlencoded() as any
)
9 changes: 9 additions & 0 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"compilerOptions": {
"outDir": "dist",
"noEmit": false,
"declaration": true
},
"extends": "./tsconfig.json",
"include": ["src/**/*.ts"]
}
9 changes: 3 additions & 6 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
{
"compilerOptions": {
"outDir": "dist",
"noEmit": true,
"module": "commonjs",
"target": "es6",
"lib": ["es2019"],
"skipLibCheck": true,
"strict": true,
"declaration": true
},
"include": ["src/*.ts"],
"exclude": []
"strict": true
}
}

0 comments on commit aec7dc7

Please sign in to comment.