Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should Git track the "typings" folder? (typings.json)

I wonder whether or not my Git should track the files in the /typings folder.

This folder is created by running typings install (I guess), and seems to be automatically created when running npm install. See https://github.com/typings/typings

Since it is generated content I believe we should not track it, but I'd like to have some feedback about it. Thanks!

like image 461
Vadorequest Avatar asked May 22 '16 09:05

Vadorequest


2 Answers

You should think of typings folder as node_modules folder for TypeScript, therefore it shouldn't be checked in. If you want to simplify your build, add

{
   "scripts" : {
      "postinstall": "typings install"
   }
}

to your package.json file then typings install will run automatically when your run npm install. Don't forget to check in your typings.json though.

like image 190
Andrey Chausenko Avatar answered Nov 15 '22 07:11

Andrey Chausenko


Since it is generated content I believe we should not track it, but I'd like to have some feedback about it.

I always check it in. Until it's a part of npm, that is what I do. Also helps me overcome bad definition files and chug along with my project. (e.g. Change type imported from typings definition)

like image 34
basarat Avatar answered Nov 15 '22 07:11

basarat