You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# long long agocd~/project
tsc -p .
zip -FS output.zip $(find . -name \*.js)# after a few days# I've changed one .ts file
tsc -p .
zip -FS output.zip $(find . -name \*.js)
Expected behavior: zip will know most .js files keep the same, and only update one .js file corresponding to the modified .ts file.
Actual behavior:
All output .js files are updated by the second tsc -p ., so zip -FS re-updates tons of .js files.
Intention
When I use tsc or tsc -p ., I want it to write into a file only if the output content is different from the old, so the modification times might keep the same, which would be friendly to many tools like diff / make / zip / Beyond Compare.
Most build systems do check time stamps before calling the compiler
But tsc -p doesn't - what it only does is to compile all .ts files found and update all output files.
And I think: unless I write a very long command line to replace a simple tsconfig.json, I won't be able to keep mtime of unchanged files. The command line would be like this:
Update: I find that configurable gulp-typescript / grunt supports this, but they're a bit more than what I just need - I just want one single config file for both VS Code and tsc.
The text was updated successfully, but these errors were encountered:
Most build systems do check time stamps before calling the compiler
But tsc -p doesn't - what it only does is to compile all .ts files found and update all output files.
tsc -p is not a build system. it is a compiler, similar to csc, gcc, javac, etc.. your build system, e.g. gulp will not call tsc if it knows it does not need to, i.e. that the outputs are newer than the inputs.
And I think: unless I write a very long command line to replace a simple tsconfig.json, I won't be able to keep mtime of unchanged files. The command line would be like this:
I am not sure i understand the issue here. tsc --p is the same as tsc --<arguments in tsconfig.json>. they behave the same, and both will update the file regardless if the output is different or not.
TypeScript Version: 2.2.0 / master
Action
Expected behavior:
zip
will know most .js files keep the same, and only update one .js file corresponding to the modified .ts file.Actual behavior:
All output .js files are updated by the second
tsc -p .
, sozip -FS
re-updates tons of .js files.Intention
When I use
tsc
ortsc -p .
, I want it to write into a file only if the output content is different from the old, so the modification times might keep the same, which would be friendly to many tools likediff
/make
/zip
/Beyond Compare
.This refers to #13776 . @mhegazy You said:
But
tsc -p
doesn't - what it only does is to compile all .ts files found and update all output files.And I think: unless I write a very long command line to replace a simple
tsconfig.json
, I won't be able to keepmtime
of unchanged files. The command line would be like this:Too ugly and inconvenient, isn't it?
Update: I find that configurable
gulp-typescript
/grunt
supports this, but they're a bit more than what I just need - I just want one single config file for bothVS Code
andtsc
.The text was updated successfully, but these errors were encountered: