Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bluette1/calculator

This project is an implementation of a basic 4-function calculator application using React.js.
https://github.com/bluette1/calculator

css javascript react

Last synced: 20 days ago
JSON representation

This project is an implementation of a basic 4-function calculator application using React.js.

Awesome Lists containing this project

README

        

# calculator

![Linters](https://github.com/bluette1/calculator/workflows/Linters/badge.svg)
![Test with jest](https://github.com/Bluette1/calculator/workflows/Test%20with%20jest/badge.svg)

## Project description
This project is an implementation of a basic 4-function calculator application using React.js.
## Screenshot
![demo picture](./public/screenshot.png)

## Built with
- Javascript
- Javascript design patterns
- Node.js
- React.js
- [Big.js](https://github.com/MikeMcl/big.js/)

## Deployed Site
[Calculator App on Netlify](https://i-calculate.netlify.app)

## Available Scripts

In the project directory, you can run:

### `yarn start`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.\
You will also see any lint errors in the console.

### `yarn test`

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

- Documentation Sites on testing:
- [How to test routes using react router dom](https://techdoma.in/react-js-testing/how-to-test-routes-react-router-dom-in-react-using-jest-1)
- [Better testing with enzyme](https://www.newline.co/fullstack-react/30-days-of-react/day-25/)
- [Running tests - create react app](https://create-react-app.dev/docs/running-tests/)

### `yarn build`

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `yarn eject`

**Note: this is a one-way operation. Once you `eject`, you can’t go back!**

If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).

### Code Splitting

This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)

### Analyzing the Bundle Size

This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)

### Making a Progressive Web App

This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)

### Advanced Configuration

This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)

### Deployment

This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)

### `yarn build` fails to minify

This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)

## Features
- The user can access the basic arithmetic functions of a simple calculator: addition, subtraction, division and multiplication, including the following functions:
- AC(All Clear) = clear all and start a new operation
- +/-(Plus/Minus) = change the sign of the displayed value from positive to negative or vice versa
- %(Percent) = use displayed value to calculate a percentage

## Contributions

There are two ways of contributing to this project:

1. If you see something wrong or not working, please check [the issue tracker section](https://github.com/bluette1/calculator/issues), if that problem you met is not in already opened issues then open a new issue by clicking on `new issue` button.

2. If you have a solution to that, and you are willing to work on it, follow the below steps to contribute:
1. Fork this repository
1. Clone it on your local computer by running `git clone https://github.com/your-username/calculator.git` __Replace *your username* with the username you use on github__
1. Open the cloned repository which appears as a folder on your local computer with your favorite code editor
1. Create a separate branch off the *master branch*,
1. Write your codes which fix the issue you found
1. Commit and push the branch you created
1. Raise a pull request, comparing your new created branch with our original master branch [here](https://github.com/bluette1/calculator)

## Author

👤 **Marylene Sawyer**
- Github: [@Bluette1](https://github.com/Bluette1)
- Twitter: [@MaryleneSawyer](https://twitter.com/MaryleneSawyer)
- Linkedin: [Marylene Sawyer](https://www.linkedin.com/in/marylene-sawyer)

## Show your support

Give a ⭐️ if you like this project!