typescript tsc not compiling newly created files
typescript tsc not compiling newly created files
I'm using typescript on a project the files all compile fine with tsc, I'm using the watch flag to look for changes. The issue I'm having is that when I create a new file tsc does not pick up the new file I have to quit the tsc process and restart it. Is this standard it seems really odd that such a great tool would lack a basic feature like this. Anyone know a work around so I can get tsc to pick up and compile newly created files without the restart?
"compilerOptions":
"module": "commonjs",
"sourceMap": true,
"target": "ES5",
"watch": true,
"project":"public/app/**/*.tsx",
"outDir": "public/dist",
"jsx": "react"
tsc
.tsconfig
.tsconfig attached to original post
– Scott w
Jul 30 '15 at 20:48
2 Answers
2
After more research it seems sadly this is the case tsc can not automatically find new files for you.
If you’re using a wildcard like this, any new files created since
running the tsc command won’t get compiled, you need to stop the
watcher and start again.
http://blog.teamtreehouse.com/getting-started-typescript
Note that whenever we create a new file, we will need to restart the
tsc process for it to pick up the new file.
http://commandercoriander.net/blog/2015/05/25/expanding-on-the-angular-2-quickstart/
Following the last reply from this issue https://github.com/Microsoft/TypeScript/issues/4553 I changed my tsconfig.json
"include": ["/**/*"]
to
"include": ["**/*"]
and it works for now.
"include": ["/**/*"]
"include": ["**/*"]
Will update my answer if this proves wrong.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
How are you running
tsc
? via a.tsconfig
file? If so, please post that in your question.– Brocco
Jul 30 '15 at 18:27