Skip to content

negar-binary/binary-mt

 
 

Repository files navigation

binary-mt

This repository contains the static HTML, Javascript, CSS, and images content of the mt.binary.com website.

Installation

In order to work on your own version of the mt.binary.com Javascript and CSS, please fork this project.

You will also need to install the following on your development machine:

npm install
sudo npm install -g grunt-cli

curl -L https://cpanmin.us | sudo perl - App::cpanminus
sudo cpanm Carton
cd scripts
carton install

How to work with this project

Deploy to your gh-pages for the first time

  1. 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-mt/en/logged_inws.html"
    }
  2. Put the app_id returned by WebSocket in src/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
  1. Run grunt dev

Deploy js/css and template changes together

grunt dev

Deploy only js/css changes

grunt deploy

Deploy some template changes

grunt dev --path=about-us

Using sub-folders

There are times that you're working on various branches at the same time, and you want to deploy/test each branch separately on your gh-pages, you can simply use --branch=branchname for grunt commands:

Release to Production

grunt release [--cleanup]

(The value is needed when more than one option is used)

###Parameters:

  • --cleanup [optional]
    • Create CNAME file with proper value according to remote origin
    • Deploy to gh-pages with the option add: false

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Perl 87.0%
  • JavaScript 11.7%
  • Other 1.3%