javascript - Specify TypeScript output file name format -


i need change typescript generated js file name else. how can that

for example have mycompany.classa.ts

it generate mycompany.classa.js default

but want mycompany.classa.generated.js

i took @ .tsconfig file couldn't find useful there.


ps. using visualstudio2013 typescript , generating js files

to compile single typescript file .js custom name, use --outfile:

tsc mycompany.classa.ts --outfile mycompany.classa.generated.js 

compiling multiple files .generated.js pattern require bit more work. compile 1 @ time in tsc example above.

tsc a.ts --outfile a.generated.js tsc b.ts --outfile b.generated.js 

or use --outdir collect compiled files under standard names, , rename them own script.

tsc --outdir ./generated # run script rename ./generated/*.js *.generated.js  

note --outfile , --outdir replace --out, deprecated:

https://github.com/microsoft/typescript/wiki/compiler-options


Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -