Code Monkey home page Code Monkey logo

binary-static's Introduction

Binary-Static

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

build node npm sass

In this document

Other Documents

Pre-installation

Before running or contribute to this project, you need to have the setup of the following packages in your environment

Quickstart

  1. Fork the project

    In order to work on your own version of the Binary.com application, please fork the project to your own repo.

  2. Clone using SSH

    git clone [email protected]:your-github-username/binary-com.git
  3. Enter project directory

    cd binary-static
  4. Install your dependencies:

    npm ci
  5. To start developing:

    npm run start
  6. Open the source code and start editing!

    Your site is now running at https://localhost:443

Preview on your local machine

  • To preview your changes locally, run sudo grunt serve
  • It will watch for Javascript or CSS changes and will rebuild on every change you make.
  • To test changes made to templates, you need to re-compile them:
    • grunt shell:compile_dev to re-compile all templates.
    • grunt shell:compile_dev --path=about-us to re-compile only template(s) which serve about-us path in URL.
  • To fix eslint errors run npm run eslint

Test link deployment

There are two types of test link deployment preview:

  1. Automatic deployment

Upon creating PR, Vercel (https://vercel.com/) will auto-generate the test link inside the PR. you can use that to preview the test link for the changes you have made.

  1. Manual deployments

You can manually deploy your test link using gh-pages with the following configurations:

Deploy to your gh-pages for the first time

  1. Register your application here. This will give you the ability to redirect back to your Github pages after login. Use https://YOUR_GITHUB_USERNAME.github.io/binary-static/en/logged_inws.html for the Redirect URL and https://YOUR_GITHUB_USERNAME.github.io/binary-static/en/redirect.html for the Verification URL.

    If you're using a custom domain, replace the Github URLs above with your domain.
    
  2. In src/javascript/config.js: Insert the Application ID of your registered application in user_app_id.

  • 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 are 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:

In order to remove the created folders from your gh-pages, you can use either:

  • grunt dev --cleanup: removes all br_* folders and deploys to the root folder.

    or

  • grunt shell:remove_folder --folder=br_branchname1,br_branchname2,...: only removes the specified folder(s) from your gh-pages.

    or

  • grunt shell:remove_folder --keep --folder=br_branchname1,br_branchname2,...: only keeps the specified folder(s) on your gh-pages and removes everything else. Just add the --keep flag.

Use a custom domain

In order to use your custom domain, please put it in a file named CNAME inside scripts folder of your local clone of binary-static.

Manage releases

git tag ${RELEASE_TARGET}_vYYYYMMDD_${INTEGER} -m 'some message'

RELEASE_TARGET could be one of staging or production for staging and production release respectively.

Example:

git tag production_v20191010_0 -m 'release fixes to production'

Push the tag:

git push origin staging_v20191010_0

Manage translations

binary-static's People

Contributors

ashkanx avatar negarn avatar mohammad-deriv avatar klyanyi avatar zaki-hanafiah avatar ruskakimov avatar cakasuma avatar jy-deriv avatar 4p00rv avatar negar-binary avatar gohanko avatar nazaninreihani avatar easteregg avatar oskarahl avatar msamprz avatar eugene-eeo avatar mustofa-binary avatar aminroosta avatar oskar-binary avatar morteza-binary avatar freddyhew avatar derivfe avatar khalid-deriv avatar alinademidova avatar jbaek7023 avatar mamali-fs avatar putrikumala avatar arash-fs avatar aminmarashi avatar bruce-binary avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.