Skip to content

Commit

Permalink
Support ambient types in dev environment by default (#2473)
Browse files Browse the repository at this point in the history
  • Loading branch information
FossPrime committed Oct 21, 2021
1 parent dd520b8 commit 5a57ab4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion packages/cli/_templates/app/base/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ module.exports = {
'@types/mocha',
feathers.framework === 'koa' ? '@types/koa-static' : '@types/compression',
'@types/node',
'ts-node-dev',
'nodemon',
'ts-node',
'typescript',
'shx'
);
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/_templates/app/base/ts/package.json.t
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const pkg = {
...h.pkg,
scripts: {
...h.pkg.scripts,
dev: 'ts-node-dev --no-notify ${h.lib}/',
dev: 'nodemon -x ts-node ${h.lib}/index.ts',
compile: 'shx rm -rf lib/ && tsc',
start: 'npm run compile && node lib/',
test: 'mocha test/ --require ts-node/register --recursive --extension .ts --exit'
Expand Down
7 changes: 5 additions & 2 deletions packages/cli/_templates/app/base/ts/tsconfig.json.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
to: "tsconfig.json"
---
{
"ts-node": {
"files": true
},
"compilerOptions": {
"target": "es2018",
"target": "es2020",
"module": "commonjs",
"outDir": "./lib",
"rootDir": "./<%= h.lib %>",
Expand All @@ -13,4 +16,4 @@ to: "tsconfig.json"
"exclude": [
"test"
]
}
}

0 comments on commit 5a57ab4

Please sign in to comment.