Skip to content

dsnair/calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project

This calculator app is built with React Hooks. It uses the mathjs package to evaluate math expressions that the user enters.

Installation

npm

cd calculator
npm install
npm start

yarn

cd calculator
yarn install
yarn start

Hosting on gh-pages

npm

  1. In master branch,
npm install --save gh-pages
  1. In package.json:

    • Add this new key-value pair:
      "homepage": "https://USER-NAME.github.io/REPO-NAME"
    • Under the "scripts" key, add this new key-value pair:
      "deploy": "npm run build && gh-pages -d build"
  2. In master branch,

npm run deploy

This will create a new branch named gh-pages on GitHub, which will contain the files required for hosting your site.

  1. Follow these instructions to configure GitHub pages to publish the site source files from the gh-pages branch.

  2. As you keep developing, run npm run deploy in the master branch to keep updating the source files on the gh-pages branch.

yarn

  1. In master branch,
yarn add gh-pages
  1. In package.json:

    • Add this new key-value pair:
      "homepage": "https://USER-NAME.github.io/REPO-NAME"
    • Under the "scripts" key, add this new key-value pair:
      "deploy": "yarn run build && gh-pages -d build"
  2. In master branch,

yarn run deploy

This will create a new branch named gh-pages on GitHub, which will contain the files required for hosting your site.

  1. Follow these instructions to configure GitHub pages to publish the site source files from the gh-pages branch.

  2. As you keep developing, run yarn run deploy in the master branch to keep updating the source files on the gh-pages branch.