This repository contains the static HTML/HAML, Javascript, CSS, and images content of the Binary.com website.
In order to work on your own version of the Binary.com Javascript and CSS, please fork this project.
You will also need to install the following on your development machine:
- Ruby, RubyGems
- Sass version 3.3.13 (
sudo gem install sass -v 3.3.13) - Node.js and NPM (see https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager)
Please check your sass version, run sass -v and it should give you Sass 3.3.13 but if it doesn't match then uninstall your version using sudo gem uninstall sass --version '<yourversion>' and execute sudo gem install sass -v 3.3.13 again
- Go to project root
npm install
sudo npm install -g grunt-cli
curl -L https://cpanmin.us | sudo perl - App::cpanminus
sudo cpanm Carton
cd scripts
carton install-
You need to have your own application registered at Binary.com because it should redirect client to your github pages after login. There is no UI for it yet, so you can send the following request for now (change YOUR_APP_NAME and YOUR_GITHUB_USERNAME as well):
{ "app_register": 1, "name": "YOUR_APP_NAME", "scopes": [ "read", "admin", "trade", "payments" ], "redirect_uri": "https://YOUR_GITHUB_USERNAME.github.io/binary-static/en/logged_inws.html" } -
Put the
app_idreturned by WebSocket insrc/javascript/config.js
- NOTE: In order to avoid accidentally committing personal changes to this file, use
git update-index --assume-unchanged src/javascript/config.js
-
Run
grunt default -
cd scriptsand runcarton exec perl compile.pl -d -f -
Run
grunt gh-pages
grunt deploy
- To compile a change in one template:
cd scriptsand runcarton exec perl compile.pl -d -f -p about-us grunt gh-pages
grunt defaultcd scriptsand runcarton exec perl compile.pl -d -fgrunt gh-pages
grunt cleangrunt defaultcd scriptsand runcarton exec perl compile.pl -fgrunt gh-pages
-fforce to overwrite the existing HTMLs-dcompile for use in gh-pages of a binary-static fork-p pathnameonly compile the files having pathname in path