Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TypeScript - Which files should I check in?

If I add a TypeScript file in Visual Studio 2013, for instance Index.ts, I will also get an Index.js and a Index.js.map file. The js-file is a compiled version of the ts-file so my question is if the js-file should be version controlled aswell or? In other words, should I check it in to the TFS? Because in a sense the js-file becomes a binary when working with TypeScript.

like image 902
AfroMogli Avatar asked Oct 20 '14 09:10

AfroMogli


1 Answers

It is best to treat the JavaScript like a binary - don't check in the js or map files at all.

This avoid noise in your source control repository and also means the build process doesn't need to overwrite source-controlled js files, which is a problem in some situations.

like image 114
Fenton Avatar answered Oct 16 '22 02:10

Fenton