This programmer needs re-training. Angular + GitHub

Status
You're currently viewing only Crazy Diamond's posts. Click here to go back to viewing the entire thread.

Crazy Diamond

Ars Tribunus Angusticlavius
8,175
My team has been tasked with creating a new web UI using Angular 6 and GitHub as source control (an enterprise installation of GitHub, not the public one).

Although it is not really relevant to this discussion, the web UI is to replace a .Net WebForm UI that was initially built in 2004 and updated since (there are microservices using WebApi that serve the data objects).

Since at least 2008, all of this code has been in TFS, so I have not had the need to use Git or anything similar. Just TFS.

I'm finding it hard to figure out the best way to create a totally new Angular 6 app, and to put it into a totally new GitHub repository. The reason I'm not using TFS for this is due to multiple reasons, but suffice it to say that the enterprise direction is NOT TFS and the tools to deploy from GitHub in our enterprise already exist.

If I go through Angular tutorials, there is an assumption that you "just know Git." When I search Google for "angular with git" I find articles that talk about deploying code to GitHub (which makes me question my understanding of Git).

I tried creating a new repository, and then "checking in" my new angular app, and it does seem to check in, and you can browse the code on our github site. But when another user downloads the code (clone?) and tries to run it, it fails due to missing node_modules directory.

So again, I question whether or not I understand the proper way of doing team development of an angular app using GitHub. (We are going to use VS Code as the IDE).

Can anyone provide some pointers or resources that will speed up my understanding of this?
 

Crazy Diamond

Ars Tribunus Angusticlavius
8,175
After checking out the repo, the dev needs to issue the command

Code:
npm install

From the command line in order to install all necessary packages to compile/run the angular app.

Typically node_modules is excluded from the git repo as you don’t want to be including a bunch of third party code in your repo when npm install wil go grab the necessary code for you.

Ok, that makes sense to me now. My searching did lead me down the path of running npm install afterwards, but it didn't exactly feel right.

I've went through the Angular 6 book, so I have a working knowledge of it for now.
 
Status
You're currently viewing only Crazy Diamond's posts. Click here to go back to viewing the entire thread.