This repository contains the source code for Object Playground.
Object Playground has been tested against the browsers listed at the top of
Jakefile.js. At the time of this writing, the following browsers are known to work. Other modern browsers are likely to work as well.
- Chrome 40
- Firefox 36
- IE 10
- IE 11
- Safari 8.0 (Mac)
- Safari 7.0 (iOS)
The following browsers are known to not work:
- IE 9: Lacks the Int32Array type used by Viz.js. A polyfill was attempted, but resulted in an "out of memory" error.
- IE 8: Does not support SVG, lacks Int32Array type.
Building and Testing
Before building for the first time:
- Install Node.js. Use the version described in Jakefile.js NODE_VERSION variable. (The npm
npackage can help with changing Node versions.)
- Download the source code by cloning the git repository:
git clone https://github.com/jamesshore/object_playground.
- All commands must run from the root of the source tree:
- To cause the build to fail unless certain browsers are tested, edit
TESTED_BROWSERSat the top of
To build (and test):
./jake.sh karma(Unix/Mac) or
jake karma(Windows) to start the Karma server.
- Point the browsers you want to test against at the URL
jake(Windows) every time you want to build and test. Use the
loose=trueoption to relax the Node.js and browser version requirements.
Note: At the time of this writing, the source code has not been confirmed to build on Windows.
To test manually:
http://localhost:8080in a browser.
(Or just open
src/index.html in a browser.)
Development and Integration
This repository contains two branches:
masteris for development.
integrationis guaranteed to build and pass all tests.
- Get to a clean build and commit your code to the master branch.
integrate(Windows) to test the master branch and merge it into the integration branch.
To change code samples:
src/user_code.jswith new sample.
Before deploying for the first time:
- Install rsync or make sure it's available on the path
PRODUCTION_HOSTat top of
deploy.jakefileto match production host (using
PRODUCTION_DIRat top of
deploy.jakefileto be the directory on the host where your public web content goes
./deploy.sh latest(Unix/Mac) or
deploy latest(Windows) to integrate the master branch and deploy it. The script will tag your git repository with
deploy-<date>-<timestamp>if the deploy succeeds.
In case of a bad deployment:
- Choose a previous, good commit to deploy.
gitk --alland the
deploytags may be helpful here.
- Check out the commit:
git checkout <commit_id>
./deploy.sh head(Unix/Mac) or
deploy head(Windows) to deploy the commit. As above, the script will tag the git repository if the deploy succeeds.