Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

binary-com/binary-mt

Repository files navigation

binary-mt

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

####Please submit your PR against beta branch.

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 --beta=1|--production=1|--translations=1 [--cleanup]

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

###Parameters:

  • --beta or --production or --translations (mandatory)
    • In order to prevent accidentally releasing to the wrong target, it is mandatory to provide one of these parameters.
    • Your remote origin will be checked to be the correct target of the given parameter.
    • Your current branch will be checked to be the correct branch of the given parameter.
  • --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