node.js - Why does --module override Typescript compiler's --out flag? -
if run $ tsc --out foo.js myfile.ts
file foo.js
. if specify --module commonjs
option, --out
parameter overriden , myfile.js ie: $ tsc --out foo.js --module commonjs myfile.ts
given use export
assignment in ts code have classes available nodejs js code, need --module
flag. think it's bug --out
flag value ignored/overridded.
the reason want suffix generated js code .gen.js can write scm rule ignore generated code.
$ node --version && tsc --version v0.10.22 version 0.9.7.0
--out
ignored files multiple modules because it's not clear means (what if had specified tsc --out foo.js module1.ts module2.ts
, module1
had require
'd module2
?).
the theory here use external build tool (grunt, jake, make, frakes, etc) rename file afterwards if wanted named different. it's intended compile external module file other filename, since compile not run.
there's codeplex issue can vote on show support implementing post-1.0.
Comments
Post a Comment