This section explains how to get the development environment up and running. It is mainly targeted for unix paltforms, such as OS X and Linux. If you are using Windows, you have to figure out the steps yourself. Additionally install VirtualBox and run Ubuntu 13.10 in it (Easier than doing this in Windows).
Before starting you need to have git version control system installed. (In ubuntu run sudo apt-get install git
)
Then make sure you can access the project at
https://github.com/mr-kimia/webrtc and you have ssh public key properly
set up.
-
Install Node.js from http://nodejs.org/ or using your operation system's package manager. Also install npm if you installed old version of Node.
In Ubuntu you can do the following:
sudo apt-get update sudo apt-get install -y python-software-properties python g++ make sudo add-apt-repository ppa:chris-lea/node.js sudo apt-get update sudo apt-get install nodejs
-
Install Ruby if you don't have it (test with
ruby -v
).In Ubuntu you can install it with
sudo apt-get install ruby
-
Install RVM:
\curl -sSL https://get.rvm.io | bash -s stable
-
Clone the project:
git clone git@github.com:mr-kimia/webrtc.git
-
Change to project directory:
cd webrtc
-
Install Grunt. You might need to do this as root (sudo):
npm install -g grunt-cli
-
Install node dependencies:
npm install
-
Install ruby dependencies:
rvm install ruby-2.1.1 rvm --create 2.1.1@webrtc rvm use 2.1.1@webrtc rvm gemset import webrtc
-
Start development server:
grunt run
-
Open up browser and go to http://localhost:3000
- Build CoffeeScript to JS and SASS to CSS:
grunt build
- Remove generated files:
grunt clean
- Run syntax checks/linters:
grunt lint
- Run the development server:
grunt run
src
contains all the source files.public
contains all the files which are sent to client.images
All the image files.scripts
Coffeescript files that will be compiled to JS and sent to client.sylesheets
Compass style files that will be compiled to CSS.
routes
Coffeescript files that build context for each handlebars template.views
Handlebars template files.
build
The runnable application. Excluded from git. The folder structure under this tree is similar to thesrc
dir tree.
- Landon Schropp, Writing an Awesome Build Script with Grunt, http://www.sitepoint.com/writing-awesome-build-script-grunt/