Many Windows developers have found that setting up an Ubuntu virtual machine is less painful than getting Ruby and other prerequisites running on Windows.
- Option A: Use VMWare Player and an Ubuntu 14.04 iso image
- Option B: Use vagrant (install):
vagrant init ubuntu/trusty64
- Configure to use 2048mb rather than 512mb RAM (instructions)
vagrant up
vagrant ssh
- Option C: Use AWS EC2: launch Ubuntu 14.04 AMI
- Install Homebrew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install https://raw.github.com/quantiverge/homebrew-binary/pdftk/pdftk.rb enscript gs mysql imagemagick rbenv ruby-build coreutils
- If it complains about an old version of
<package>
, runbrew unlink <package>
and runbrew install <package>
again - Set up MySQL
- Have launchd start mysql at login:
ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
- Start mysql now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
- Set up RBENV and Ruby 2.0
- Add
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
to~/.profile
- source
~/.profile
- rbenv install 2.0.0-p451
- rbenv global 2.0.0-p451
- rbenv rehash
sudo aptitude update
sudo aptitude upgrade
sudo aptitude install -y git mysql-server mysql-client libmysqlclient-dev libxslt1-dev libssl-dev zlib1g-dev imagemagick libmagickcore-dev libmagickwand-dev nodejs npm openjdk-7-jre-headless libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev curl pdftk
- Hit enter and select default options for any configuration popups
git clone https://github.com/code-dot-org/code-dot-org.git
gem install bundler
rbenv rehash
(if using rbenv)cd code-dot-org/aws
bundle install
cd ..
rake install
Our code is segmented into four parts:
- Blockly Core is the visual programming language platform used for the interactive tutorials.
- Blockly includes apps—blockly puzzles built based on Blockly Core.
- Dashboard, is the tutorial platform which organizes blockly levels into tutorials.
- Pegasus is the main site which also includes the teacher dashboard (support for teachers to track student progress).
cd code-dot-org
rake build:dashboard
(Generally, do this after each pull)bin/dashboard-server
- Visit http://localhost.studio.code.org:3000/
cd code-dot-org
rake build:pegasus
(Generally, do this after each pull)bin/pegasus-server
- Visit http://localhost.code.org:9393/
The learn.code.org default dashboard install includes a static build of blockly, but if you want to make modifications to blockly or blockly-core you'll want to enable building them in the build:
You'll need to do this once:
- OS X:
- Install the Java 8 JDK
- Install XQuartz (NOTE: This is required to build the Canvas dependency).
cd code-dot-org
- Edit
locals.yml
- Add
build_blockly: true
- Add
build_blockly_core: true
- Add
use_my_blockly: true
rake install
This configures your system to build blockly (and blockly-core) whenever you run rake build
and to use the version of blockly that you build yourself.
One of the node modules, node-canvas, depends on Cairo being installed.
Instructions for MacOSX using brew (instructions for other platforms can be found here):
- Make sure XCode Command-line Tools are installed and up-to-date:
xcode-select --install
- Install XQuartz from here
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/opt/X11/lib/pkgconfig"
brew update
brew install cairo
- In blockly,
npm install
cd code-dot-org
rake build
This will build everything you have set to build in locals.yml
.
You can use rake build:blockly
and rake build:blockly_core
to build a specific project.
You can also set build_dashboard: false
and/or build_pegasus: false
in locals.yml
if you don't need to build these frequently. They default to true
.
We'd love to have you join our group of contributors!
Anyone who would like to contribute to code.org projects must read and sign the Contributor License Agreement. We can't accept pull requests from contributors who haven't yet signed the CLA.
Join our community development HipChat room for help getting set up, picking a task, etc. We're happy to have you!
If you want to make sure you get our attention, include an @all (everyone) or @here (everyone currently in the room) in your message.
We maintain a Pivotal Tracker board with volunteer-friendly bug tasks, project ideas and small infrastructure/code quality opportunities here: https://www.pivotaltracker.com/n/projects/1192642
If you'd like to grab a task, have ideas for projects or want to discuss an item, email [email protected] for a board invite.
We support recent versions of Firefox, Chrome, IE9, iOS Safari and the Android browsers (full list of supported browsers and versions). Be sure to try your feature out in IE9, iOS and Android if it's a risk. BrowserStack live or Sauce Labs manual let you run manual tests in these browsers remotely.
For dashboard changes, be sure to test your changes using rake test
. For blockly changes, see our grunt testing instructions.
Our continuous integration server regularly runs a suite of UI tests using Selenium / Cucumber which run against many browsers via BrowserStack Automate, and can also be run locally using chromedriver
. See the README in that folder for instructions.
If your changes might affect level paths, blockly UI, or critical path site logic, be sure to test your changes with a local UI test.
Contributors should follow the GitHub fork-and-pull model to submit pull requests into this repository.
- On your fork, you'll either push to your own finished branch or checkout a new branch for your feature before you start your feature
git checkout -b branch_name
- Develop the new feature and push the changes to your fork and branch
git add YYY
git commit -m "ZZZ"
git push origin branch_name
- Go to the code-dot-org GitHub page
- For your submission to be reviewed
- Click on the "Pull Request" link, look over and confirm your diff
- Submit a pull request for your branch to be merged into staging
- For bonus points, include screenshots in the description. Command + Ctrl + Shift + 4 in OS X lets you copy a screen selection to your clipboard, which GitHub will let you paste right into the description
- After your pull request is merged into staging, you can review your changes on the following sites: