I'm trying to convert a pet project to TypeScript and don't seem to be able to use the tsc
utility to watch and compile my files. The help says I should use the -w
switch, but it looks like it can't watch and compile all *.ts
files in the some directory recursively. This seems like something tsc
should be able to handle. What are my options?
相关问题
- Angular RxJS mergeMap types
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
Look into using grunt to automate this, there are numerous tutorials around, but here's a quick start.
For a folder structure like:
You can watch and work with typescript easily from the example folder with:
With package.json:
And a grunt file:
Today I designed this Ant MacroDef for the same problem as yours :
Use it in your build file with :
It is used in the project PureMVC for TypeScript I'm working on at the time using Webstorm.