Skip to content

Instantly share code, notes, and snippets.

@brianswisher
Created October 2, 2013 18:25
Show Gist options
  • Save brianswisher/6798253 to your computer and use it in GitHub Desktop.
Save brianswisher/6798253 to your computer and use it in GitHub Desktop.

System dependancies

win - cmd.exe | mac - Terminal.app

*Install latest versions for all

NodeJs - accept installer defaults

$ node --version
v0.10.17

Bower (javascript package manager)

# mac
$ sudo npm install -g bower

# win
> npm install -g bower

PhantomJS (headless webkit browser)

# mac/unix
$ phantomJs -v
1.9.1

# win
> cd "C:\Program Files\PhantomJS"

win - RubyInstaller (use the 1.9.3 release) | other - Ruby

$ ruby --version
ruby 1.8.7
# if that doesn't work try
$ ruby -v

Ruby gems compass (sass) & zen-grids

$ gem update --system 
Updating installed gems
...

# mac
$ sudo gem install compass zen-grids
# win
> gem install compass zen-grids

...
Successfully installed compass-0.12.2
Successfully installed zen-grids-1.4
2 gems installed

$ gem query
...
compass (0.12.2)
sass (3.2.9)
zen-grids (1.4)
...
# Newer versions (non alpha) are fine

karma (Test Runner for JavaScript)

# mac
$ sudo npm install -g karma

# win
> npm install -g karma

p4 command line (source control)

$ p4 help edit
...
edit -- Open an existing file for edit
...

Quick start

win - cmd.exe | mac - Terminal.app

cd /p4/phoenix/main/phoenixApp/mobiWebApp
# on Windows go to start/run/cmd
# cd \p4\phoenix\main\phoenixApp\mobiWebApp
npm install
p4 edit static/dist/*
grunt

Congratulations. You've just pre-processed & tested mWeb client files!

Commands

  • p4 edit static/dist/* Check out all generated files.
  • grunt Process everything (do a p4 edit static/dist/* first)
  • grunt server Run all servers (prototype, livereload, weinre, & proxy )
  • grunt test Runs all unit tests

Troubleshooting

  1. Make sure you are at the root of mobiWebApp.
  2. Make sure npm install ran & completed, it may take a minute or so. Run it again, it won't hurt anything and should take less time the second time around.
  3. Run gem query and make sure you have only one version of sass installed. The one you want is "sass (3.3.0.alpha.141, 3.2.5)", unless you are on Windows in which case, just make sure you have one non alpha gem. Run gem uninstall sass. You'll be prompted to specify which one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment