Followed the original flow of "Building and Testing AngularJS", however it doesn't work to me.
So I made my own flow here.
Note: I am not a pro npm user.
AngularJS v.1.4.3
# clean cache of npm
npm cache clean
# get the latest npm
sudo npm install -g npm
# install node version manager
sudo npm install -g n
#install grunt-cli
sudo npm install -g grunt-cli
#install bower
sudo npm install -g bower
# Clone your Github repository:
git clone "https://github.com/<github username>/angular.js.git"
# Go to the AngularJS directory:
cd angular.js
# Add the main AngularJS repository as an upstream remote to your repository:
git remote add upstream "https://github.com/angular/angular.js.git"
# change the owner (optional)
sudo chown $USER:$GROUP .
# install certain version of node. Because Karma, one of the dependencies of angular, requires node ~0.10
sudo n 0.10.40
# Install node.js dependencies:
sudo npm install
# Install bower components:
sudo bower install --allow-root
# install grunt locally
sudo npm install grunt --save-dev
# install grunt dependencies
sudo npm install
# Build AngularJS:
sudo grunt package