0

Suppose I have following folder structure:

-->Proj_Folder/
--->Common/
---->abc/
----->ts/
------>a.ts
--->src/
---->ts
----->app.ts

And compile js files to:

-->Proj_Folder/
--->Common/
---->abc/
----->ts/
------>a.ts
----->js/
------>a.js
--->src/
---->ts
----->app.ts
---->js
----->app.js

My current tsconfig file is :
{ "compilerOptions": { "target": "es5", "moduleResolution": "node", "sourceMap": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, "lib": [ "es2015", "dom" ], "noImplicitAny": true, "suppressImplicitAnyIndexErrors": true } }

It is about the folder structure and compiling method.

  • 1
    I don't think you can do that with the compiler settings alone. But it is also bad practice to keep your ouptuted js together with the TS files, it's much better to just have them all outputed in a separate folder. The question is why do you need this? – toskv Aug 03 '17 at 07:11
  • Thank you for your reply, But just out of curiosity, can we config ts to compile js files in such structure. – Siddhesh Kulkarni Aug 03 '17 at 07:19
  • not with the tsc options alone, you can have the .js in the same folder as the .ts file or in a separate folder alltogheter using `outDir` option. – toskv Aug 03 '17 at 10:50
  • Not good, I don't want such structure. – Siddhesh Kulkarni Aug 07 '17 at 14:00

0 Answers0