Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment PR #7

Merged
merged 47 commits into from
Jan 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
a0ce776
Initialize React application
kambereBr Aug 7, 2023
e8d82f9
setup linters
kambereBr Aug 8, 2023
f205c87
fix linters error
kambereBr Aug 8, 2023
1cb1a92
Write professional README.md
kambereBr Aug 8, 2023
2f24c30
Update README.md file
kambereBr Aug 8, 2023
c371a3e
Merge pull request #1 from kambereBr/setup-branch
kambereBr Aug 8, 2023
b50553c
setup prop-types
kambereBr Aug 11, 2023
69105ff
Create Button component
kambereBr Aug 11, 2023
ed36db2
Add style to Button Component
kambereBr Aug 11, 2023
39ba766
Clean boilerplate style from Create React App
kambereBr Aug 11, 2023
70440a9
Create Calculator components
kambereBr Aug 11, 2023
2cdba1b
Import Calculator component into App.js
kambereBr Aug 11, 2023
aa652b8
Clean index.js file
kambereBr Aug 11, 2023
2d8a728
delete react boilerplate images
kambereBr Aug 11, 2023
48e046e
deleted logo.svg from src
kambereBr Aug 11, 2023
2ab2e1d
Fix linters errors
kambereBr Aug 11, 2023
d0f3dbd
modified Calculator.js in components
kambereBr Aug 11, 2023
49b1086
added calculate.js and operate.js to logic
kambereBr Aug 11, 2023
b49ab49
delete all boilerplate created by the CRA
kambereBr Aug 11, 2023
724a4b0
add new stylesheet file
kambereBr Aug 11, 2023
63c0a27
Merge pull request #2 from kambereBr/components-branch
kambereBr Aug 11, 2023
7fe1a86
Install big.js
kambereBr Aug 11, 2023
c4403c6
Merge branch 'development' into events-branch
kambereBr Aug 11, 2023
cf95947
add event listener to Button component
kambereBr Aug 11, 2023
11cfa59
Implement events in calculator component
kambereBr Aug 11, 2023
43959b2
fix linters errors
kambereBr Aug 11, 2023
f7c779a
Merge pull request #3 from kambereBr/events-branch
kambereBr Aug 11, 2023
e30e6b9
added Quote component
kambereBr Aug 12, 2023
6077192
Add App h1 title
kambereBr Aug 12, 2023
cb6d4fe
fix linter errors
kambereBr Aug 12, 2023
b786c90
Merge pull request #4 from kambereBr/api-branch
kambereBr Aug 12, 2023
252d948
install react router library
kambereBr Aug 19, 2023
2552bbe
move styles files to the appropriate folder
kambereBr Aug 19, 2023
3f86d32
add Home component
kambereBr Aug 19, 2023
52b530a
enhance calculator and quote components
kambereBr Aug 19, 2023
81da52f
clean index file
kambereBr Aug 19, 2023
888ec2c
add NavBar component with all routes
kambereBr Aug 19, 2023
50eb227
import navbar component
kambereBr Aug 19, 2023
7a13680
enhance the app styling
kambereBr Aug 19, 2023
03ed238
fix linters errors
kambereBr Aug 19, 2023
f98b2e2
enhance quote styling
kambereBr Aug 19, 2023
541d775
Move all menu links into App.js file
kambereBr Aug 19, 2023
d27d6ee
Merge pull request #5 from kambereBr/full-website-branch
kambereBr Aug 19, 2023
be8baae
Update calculate.js
kambereBr Oct 21, 2023
2ef4d6b
Refactor Button component props
kambereBr Jan 1, 2024
84e4d47
Update author LinkedIn link
kambereBr Jan 1, 2024
c20f619
Merge pull request #6 from kambereBr/refactor-btn-component
kambereBr Jan 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"presets": [
"@babel/preset-react"
],
"plugins": ["@babel/plugin-syntax-jsx"]
}
35 changes: 35 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"env": {
"browser": true,
"es6": true,
"jest": true
},
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"extends": ["airbnb", "plugin:react/recommended", "plugin:react-hooks/recommended"],
"plugins": ["react"],
"rules": {
"react/jsx-filename-extension": ["warn", { "extensions": [".js", ".jsx"] }],
"react/react-in-jsx-scope": "off",
"import/no-unresolved": "off",
"no-shadow": "off"
},
"overrides": [
{
// feel free to replace with your preferred file pattern - eg. 'src/**/*Slice.js' or 'redux/**/*Slice.js'
"files": ["src/**/*Slice.js"],
// avoid state param assignment
"rules": { "no-param-reassign": ["error", { "props": false }] }
}
],
"ignorePatterns": [
"dist/",
"build/"
]
}
45 changes: 45 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Linters

on: pull_request

env:
FORCE_COLOR: 1

jobs:
eslint:
name: ESLint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18.x"
- name: Setup ESLint
run: |
npm install --save-dev [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] @babel/[email protected] @babel/[email protected] @babel/[email protected] @babel/[email protected] @babel/[email protected]
[ -f .eslintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/react-redux/.eslintrc.json
[ -f .babelrc ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/react-redux/.babelrc
- name: ESLint Report
run: npx eslint "**/*.{js,jsx}"
stylelint:
name: Stylelint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18.x"
- name: Setup Stylelint
run: |
npm install --save-dev [email protected] [email protected] [email protected] [email protected]
[ -f .stylelintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/react-redux/.stylelintrc.json
- name: Stylelint Report
run: npx stylelint "**/*.{css,scss}"
nodechecker:
name: node_modules checker
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Check node_modules existence
run: |
if [ -d "node_modules/" ]; then echo -e "\e[1;31mThe node_modules/ folder was pushed to the repo. Please remove it from the GitHub repository and try again."; echo -e "\e[1;32mYou can set up a .gitignore file with this folder included on it to prevent this from happening in the future." && exit 1; fi
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
20 changes: 20 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"extends": ["stylelint-config-standard"],
"plugins": ["stylelint-scss", "stylelint-csstree-validator"],
"rules": {
"at-rule-no-unknown": [
true,
{
"ignoreAtRules": ["tailwind", "apply", "variants", "responsive", "screen"]
}
],
"scss/at-rule-no-unknown": [
true,
{
"ignoreAtRules": ["tailwind", "apply", "variants", "responsive", "screen"]
}
],
"csstree/validator": true
},
"ignoreFiles": ["build/**", "dist/**", "**/reset*.css", "**/bootstrap*.css", "**/*.js", "**/*.jsx"]
}
160 changes: 158 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,158 @@
# Math-magicians
"Math magicians" is a website for all fans of mathematics. It is a Single Page App (SPA) that allows users to make simple calculations and read a random math-related quote.
<!-- TABLE OF CONTENTS -->

# πŸ“— Table of Contents

- [πŸ“– About the Project](#about-project)
- [πŸ›  Built With](#built-with)
- [Tech Stack](#tech-stack)
- [Key Features](#key-features)
- [Future Features](#future-features)
- [πŸ’» Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Setup](#setup)
- [Install](#setup)
- [Usage](#usage)
- [Deployment ](#deployment-)
- [Test](#test)
- [πŸ‘₯ Authors](#authors)
- [🀝 Contributing](#contributing)
- [⭐️ Show your support](#support)
- [πŸ™ Acknowledgements](#acknowledgements)
- [πŸ“ License](#license)

<!-- PROJECT DESCRIPTION -->

# πŸ“– Math-magicians <a name="about-project"></a>

**Math-magicians** is a website for all fans of mathematics. It is a Single Page App (SPA) that allows users to make simple calculations and read a random math-related quote.

## πŸ›  Built With <a name="built-with"></a>

### Tech Stack <a name="tech-stack"></a>

<details>
<summary>Client</summary>
<ul>
<li><a href="https://www.w3schools.com/html/">HTML</a></li>
<li><a href="https://www.w3schools.com/css/">CSS</a></li>
<li><a href="https://www.w3schools.com/js/">JavaScript ES6</a></li>
<li><a href="https://react.dev/">React</a></li>
</ul>
</details>

<!-- Features -->

### Key Features <a name="key-features"></a>

- Calculator that performs all math operations
- Fetch data from API

<p align="right">(<a href="#readme-top">back to top</a>)</p>

### Future Features <a name="future-features"></a>

- **Implement a CSS Preprocessor.**

<p align="right">(<a href="#readme-top">back to top</a>)</p>


## πŸ’» Getting Started <a name="getting-started"></a>

To get a local copy up and running, follow these steps.

### Prerequisites <a name="prerequisites"></a>

In order to run this project you need:

- Install Git on your computer Git
- Any text editor like VSCode
- Install linters on your local environment


### Setup <a name="setup"></a>

To get a local copy up and running, follow these steps:

1. Clone the repository: `git clone https://github.com/kambereBr/math-magicians.git`
2. Navigate to the project directory: `cd math-magicians`

### Install <a name="install"></a>

Install npm:
```
npm install

npm run build

```

### Usage <a name="usage"></a>

Inside your IDE:


```
npm start
```

### Deployment <a name="deployment"></a>

You can deploy this project using: GitHub Pages


### Test

In order to follow the Linters you could check them using this:

```
HTML Checker:
npx hint .

CSS Checker:
npx stylelint "**/*.{css,scss}"

JavaScript Checker:
npx eslint .
```

#### Note

Use at the end '--fix' to help you out with any error.

## πŸ‘₯ Author <a name="authors"></a>

πŸ‘€ **Bruno Kambere**

- GitHub: [@kambereBr](https://github.com/kambereBr)
- Twitter: [@kambereBr](https://twitter.com/kambereBr)
- LinkedIn: [bruno kambere](https://www.linkedin.com/in/bruno-kambere/)

<p align="right">(<a href="#readme-top">back to top</a>)</p>

## 🀝 Contributing <a name="contributing"></a>

Contributions, issues, and feature requests are welcome!

Feel free to check the [issues page](../../issues/).

<p align="right">(<a href="#readme-top">back to top</a>)</p>

## ⭐️ Show your support <a name="support"></a>

If you like this project feel free to watch it and take some features that will enhance your project
as well.

<p align="right">(<a href="#readme-top">back to top</a>)</p>

## πŸ™ Acknowledgments <a name="acknowledgements"></a>

I would like to thank the Microverse Team for reviewing my code and making me a better
professional.

<p align="right">(<a href="#readme-top">back to top</a>)</p>

## πŸ“ License <a name="license"></a>

This project is [MIT](LICENSE) licensed.

<p align="right">(<a href="#readme-top">back to top</a>)</p>
Loading