This documentation will guide you through this Angular project installation.
Skip this section's steps if you already have Node.js, git and Angular CLI installed your local machine, and a valid GitHub account.
If not, follow next steps:
- Download and install git CLI if you haven't yet: https://git-scm.com/
- Create a GitHub account if you haven't yet: https://github.com/
Then check for its version, to make sure the installation went fine.
To do so, type this in your terminal or console:
git--version
- Then, set up your name and email for local git CLI.
Type the following commands in your terminal or console:
git config –-global user.name <yourGitHubName>
git config –-global user.email <yourGitHubEmail>
- Name and email must match those you registered in GitHub account.
Then, check result. Type in:
git config –-global user.name
git config –-global user.email
- Downlad and install Node.js if you haven't yet: https://nodejs.org/es/
Then check for its version, to make sure the installation went fine:
node -v
- Downlad and install Angular CLI if you haven't yet: https://angular.io/
Install Angular CLI globally in your machine:
npm install -g @angular/cli
Then check for its version, to make sure the installation went fine:
ng v
- Clone the repo from remote to local:
git clone <repoURL>
Access that folder in local. If you're using your terminal or console, type:
cd <localProjectFolderName>
IMPORTANT! Be sure you are inside the <localProjectFolderName> folder
- Remember to download all
node-modules
dependecies as defined in thepackage.json
file.
To do so, jut type in the following command in your terminal:
npm update
REMEMBER! Never push node-modules to GitHub, since the folder is too big sized
node-modules are already excluded in the
.gitignore
file. Never modify that line!
- This project has 2 branches (
main
andDev
), which should NOT be manipulated by any developer.
That role is restricted to project managers, who will accept or reject developer'spull requests
.
- Use the following semantics for naming your branches:
<ScrumTask_ID>
or optionally<ScrumTask_ID-featureBranchName>
.
For example: F1.4 or F1.4_LoginView
- And don't forget to create your
feature
branches fromDev
.
To do so:
- Pull actual Dev branch state:
git pull origin Dev
- Create your feature branch:
git checkout -b <featureBranchName>
- Work on your branch. Do your
add-to-stage
andcommits
- Pull Dev branch state again:
git pull origin Dev
- Push your branch to the repo:
git push origin <featureBranchName>
- Finally, do a
pull request
inGitHub
, from your branch to Dev
- Open development server:
ng serve -o
- Restart development server:
ng serve
- Run Kharma test runner:
ng test
- Run test coverage to add the coverage folder to the project.
Then open its index.html in browser to see the coverage view
ng test --no-watch –code-coverage
- Build for development:
ng build
- Build for production:
ng build --prod