How to compile few typescript files to single output js-file
As I understand the answer for PHPStorm and WebStorm will be the same.
I have such project structure:
myproject
index.html
states
typescriptinstate.ts
logic
typescript1.ts
typescript2.ts
additional logic
typescript3.ts
typescript4.ts
....
And in myproject folder I want to have finaljs.js file (compiled file) that will be compiled from all these type script files to single js one.
How to do it so that file watcher will recompile the whole project, not only the single file?
I tried to google this but didn't find any solution that would work for me.
Your help will be much appreciated :)
Please sign in to leave a comment.
Please see http://stackoverflow.com/questions/21816695/typescript-compile-all-ts-files-as-a-single-javascript-file-in-webstorm-7 for possible solutions
I've seen this thread. The issue is that it compiles only file that I change. It doesn't compile all files (and I need all files).
My last params attemp:
--sourcemap $FileDir$\$FileName$ --out BreakOutGame.js
Do you have "Compile main files only" option enabled? If it's on, watchers are run for all files that reference the original file directly or indirectly, via ///<reference> tags or imports, spawning a separate external process for each of them. Disabling this option results in compiling the current file only.
See also the second answer in http://stackoverflow.com/questions/21816695/typescript-compile-all-ts-files-as-a-single-javascript-file-in-webstorm-7 ('For those who don't have a single file that links to all other ones...')