1
votes

So I have been using Visual Studio Code (vscode) when playing with some sample es6 projects.

My understanding is that in order to get intellisense to work properly with node modules, you need to include the typings of the projects that you're working on (Link here).

What I also understand is that you can have a typings.json file that stores all the "type definitions" and you run a typings install to retrieve all the typings.

This is all to get the intellisense working in vscode. What I am not sure is whether you should exclude this (typings folder and typings.json) from version control altogether?

At the moment I think that the editor should not influence the source code structure. I'm pretty sure that you should exclude the typings folder. I am not sure about typings.json. It could be useful for vscode users, but will most likely be pointless for WebStorm/Atom/Sublime/Vim users?

1
If you don't control it (in the same project), it probably doesn't belong in the same repo. You're better off with an on-site proxy or artifact server than committing your dependencies to each project.ssube

1 Answers

2
votes

The content of the typings folder can easily be recreated by running typings install. If you have any kind of build process like webpack, browserify, gulp or similar, then you also need to have these definitions to be able to run the typescript compiler in your continuous integration system for example.

So you should commit the typings.json and add some npm postinstall scripts to automatically download the typings when you run npm install to be able to build your code in an automated way.