Mark
Mark

Reputation: 4960

Angular development and TFS

I am about to start a new Angular development.

So far, I have been doing it by following Angular documentation - installing node packages and then creating an Angular project.

Now, I want to move development into existing VS solution to have everything under the same hood. We are using TFS for a source control and continuous integration.

Our branch strategy requires that each branch would have a complete solution so it can run independently. Seems to me that checking in the whole Angular project (with node modules - 64 thousands files) into every branch is not the best approach.

So, my question is: is there a way of installing just a minimum of node modules that Angular needs?

I have installed Angular CLI: npm install @angular/cli, but still it is about 8000 files. Anyone could share Angular/TFS experience?

Upvotes: 3

Views: 1153

Answers (1)

dev-dan
dev-dan

Reputation: 6293

I wouldn't recommend any node_modules going in to your version control.

I would make TFS ignore the node_modules and set up a way to just keep them local. NPM should make a package.json file for you and a package-lock.json file. This should be included in your version control strategy as it allows to keep track of packages and dependencies without needing the node_modules.

This would mean that the node_modules you keep locally should be fine and if new packages have been added to the package.json you could run npm i to get the latest of each package you need. This would save trying to pull node_modules up and down through version control.

I cant help more with the TFS side but something like this should help you achieve what you are looking for.

some good information to look at in this article. Little old but think for the most part it stands true.

Upvotes: 2

Related Questions