Recently, I embarked on a small TypeScript project and took the time to create the tsconfig.json configuration file.
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"sourceMap": true
},
"files": [
"./typings/index.d.ts"
]
}
In my project directory, there are two essential files: app.ts and hero.ts which both contain TypeScript code snippets.
To my surprise, when running tsc -p .
, there seems to be no compilation being triggered, unlike when using tsc hero.ts app.ts
.
I find it puzzling why tsc -p .
fails to work as expected.
Context
Upon setting up TypeScript with npm, here is where tsc is located:
% which tsc ...path_to_project/node_modules/.bin/tsc
The curated dependencies within my package.json file include:
"dependencies": {
"backbone": "^1.3.3",
"backbone.localstorage": "^2.0.0",
"jquery": "^3.2.1",
"typescript": "^2.3.4"
},