Install AngularJS with YeoMan on MacOS X
Pre-Conditions
This tutorial is written explicitly for following versions of AngularJS and NodeJS:
- AngularJS 1.2.16
- NodeJS 0.10.30
This tutorial might not work for other versions and will not be updated!
Check if NodeJS is installed:
node --version && npm --version
Install NodeJS
Download and Install NodeJS from following website: http://nodejs.org/
Check if GIT is installed
git --version
Install GIT
Download and Install GIT from following website: http://git-scm.com/
Install yo
sudo npm install --global yo
Install grunt
sudo npm install grunt --save-dev
Re-Install NPM
sudo npm install
Check if everything was installed
yo --version && bower --version && grunt --version
Install AngularJS generator
sudo npm install --global generator-angular
Adjust permissions
sudo echo prefix = ~/.node >> ~/.npmrc
Create project folder
mkdir testProject
cd testProject
Create Angular Project
yo angular
You'll be asked what you want to choose. It's usually a good idea to add all libraries.
Start server
grunt serve
Now a website should open and display the initial page.
No comments:
Post a Comment