Skip to content

Instantly share code, notes, and snippets.

@gophry
Created October 12, 2013 10:10
Show Gist options
  • Save gophry/6948267 to your computer and use it in GitHub Desktop.
Save gophry/6948267 to your computer and use it in GitHub Desktop.
Getting Started with Yeoman - Web App Workflow Development Tool.[Ubuntu]
<!--
Author: Yogesh Kamat
Date: October 12, 2013.
Subject: Yeoman Basic Kickstart.
-->
Getting Started with Yeoman - Web App Workflow Development Tool.
To start with Yeoman we need:
1. nodejs
2. npm(Node package manager)
3. git
4. Any IDE(e.g: Sublime Text, vim, emacs, Eclipse, Webstorm etc...)
[A] Basic Installation Process:
1. For installing Nodejs and npm - on Linux:
a. $ sudo apt-get update
b. Go to http://nodejs.org/download/ and click on Installing from package managers.
A new link will open https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
i. $ sudo apt-get install python-software-properties python g++ make
ii. $ sudo add-apt-repository ppa:chris-lea/node.js
iii. $ sudo apt-get update
iv. $ sudo apt-get install nodejs
c. Check out if node is installed properly. $nodejs -v OR $node -v
2. For installing Yeoman - on Linux:
a. sudo npm install -g yo
b. Test yeoman: $ yo
3. For installing GIT - on Linux:
a. $ sudo apt-get install git
[B] Yeoman Basic Workflow kickstart:
Description:
Yeoman has three pillars
1. yo [Scaffolding Tool]
2. Bower[Package Manager]
3. Grunt[Task flow]
Backbone Generator Example:
1. Commonly known scaffolds[generators] are available e.g: backbone, basic-webapp, angular.
First we need to install backbone-generator globally using npm:
$ sudo npm install -g generator-backbone
2. YO - Create a skeleton app:
$ yo backbone [create necessary project directory]
3. BOWER - install the dependencies mentioned in package.json
$ bower install
$ npm install
4. GRUNT - for Testing and building the app.
$ grunt test [For passing through common javascript tests.]
$ grunt server [For running the application locally]
$ grunt [ Distribution ready and minified app.]
In case if you get a WARNING mentioning ruby and compass not installed follow these steps:
1. $ sudo apt-get install ruby rubygems
2. $ sudo gem install compass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment