I've been working on a TypeScript project for a while and I was using browserify (watchify) and it was working fine, but then just now I was trying to trim down some dependencies and I don't think I should need these to build a TypeScript project. So, instead of using this command (which was working):
watchify src/index.ts -p [ tsify --watch ] -o bin/bundle.js
I thought to just try this:
tsc
And I also tried
tsc --build
But the issue is that.. those commands don't seem to do anything. My command prompt thinks for a couple seconds, and then returns. No errors, but also no bundle.js either.
My tsconfig.json (which was also being used by watchify and worked fine there), looks like this:
{
"parser": "babel-eslint",
"parserOptions": {
"sourceType": "module",
"allowImportExportEverywhere": true
},
"compileOnSave": true,
"compilerOptions": {
"downlevelIteration": true,
"allowJs": false,
"outDir": "bin",
"module": "commonjs",
"lib": [ "es5", "es6", "dom", "es2017" ],
"noImplicitAny": false,
"removeComments": true,
"preserveConstEnums": true,
"sourceMap": true,
"target": "es5",
"watch": true,
"resolveJsonModule": true,
"suppressImplicitAnyIndexErrors": true
},
"include": [
"src/*"
]
}
Any idea why this might be happening? I feel like I shouldn't need browserify or watchify or any of that stuff. Shouldn't I just be able to type tsc and have it create a bundle file? If so, why isn't it .. doing anything..?