KICKSTARING GAIA

THE BASICS

Running the Gaia codebase

  • Flash your phone with an updated Gaia build.
  • Launch your Gaia inside a B2G Desktop build.
  • Run your Gaia inside the App Manager/Firefox Simulator.
  • Launch Gaia inside Desktop Firefox

Understanding the codebase

apps/

build/

dev_apps/

keyboard/

locales/

shared/

tools/

apps/

  • index.html: the central file for each app
  • manifest.webapp: the manifest file defines the app
  • locales: localisation strings for that app
  • test: unit and integration tests particular to that app
  • js, style: scripts and styles for that app
  • resources: images, sounds and other assets

Gaia Coding Style

  • Declare with <!DOCTYPE HTML>
  • "use strict"
  • Two spaces for indentation, no tabs
  • Seperate multiword filenames with underscore
  • Single quotes for strings

Lets get started!

Running Gaia in Desktop Firefox

  1. First, make a fork of the main Gaia repo on Github.
  2. Next, clone your fork locally

 

git clone https://github.com/your-username/gaia.git

3.  Add the upstream

cd gaia
git remote add upstream https://github.com/mozilla-b2g/gaia

4.  Build the DEBUG Profile

DEBUG=1 make
/path_to_firefox -profile ../gaia/profile-debug

5.  Run it! 

Making changes to the code

  1. When making changes to Gaia, you should first Grab the latest from master:
     
cd path/to/gaia
git checkout master
git pull upstream master

2.  Next, check out a new branch to create your fixes on:

git checkout -b my-code-fix

[GOOD FIRST BUGS]

I blogged on the same

@dolftax

Made with Slides.com