Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
0eb0961
Setup the project with Webpack and Jest
Yemisirach Feb 20, 2023
3c0eff7
setup API
DamenaM Feb 21, 2023
18be0cd
Add meals list
DamenaM Feb 21, 2023
c287190
fix linter error
DamenaM Feb 21, 2023
70d0cc2
Fix Lighthouse error
DamenaM Feb 21, 2023
156c94a
fix linter
DamenaM Feb 21, 2023
1e9f6bf
fix node modules
DamenaM Feb 21, 2023
602b429
fix error lighthouse
DamenaM Feb 22, 2023
5c54de2
update npm config
DamenaM Feb 22, 2023
114962c
Modify meal styles.css file
Yemisirach Feb 22, 2023
2aabad1
Correct eslint error
Yemisirach Feb 22, 2023
a59d870
Correct eslint error
Yemisirach Feb 22, 2023
5102aac
Correct eslint error
Yemisirach Feb 22, 2023
bd8cdf2
Merge pull request #23 from Yemisirach/API-based-webapp
Yemisirach Feb 22, 2023
dccca63
Styled header and footer
Kingno3l Feb 22, 2023
40104a5
Merge pull request #25 from Yemisirach/header-footer
Kingno3l Feb 22, 2023
8247a11
Add popop windows and update UI
Yemisirach Feb 23, 2023
0e09356
Add commit popup comment
Yemisirach Feb 24, 2023
35eccee
add reservation popup windows
Yemisirach Feb 25, 2023
6cbc755
modify comment popuo
Yemisirach Feb 25, 2023
7260703
add readme fiel
Yemisirach Feb 25, 2023
1300d9d
adding meal count
DamenaM Feb 25, 2023
8c51239
Merge pull request #27 from Yemisirach/comment-popup-windows
Yemisirach Feb 25, 2023
410cf92
modify the meals count
Yemisirach Feb 25, 2023
822ee9e
Merge branch 'comment-popup-windows' of github.com:Yemisirach/JavaScr…
Yemisirach Feb 25, 2023
be266b5
modifiy style
Yemisirach Feb 25, 2023
d61bc8a
add test commite and meal count
Yemisirach Feb 25, 2023
c56afa1
Merge pull request #29 from Yemisirach/comment-popup-windows
Yemisirach Feb 25, 2023
54ade20
Merge pull request #30 from Yemisirach/dev
Yemisirach Feb 25, 2023
d44f782
Merge pull request #28 from Yemisirach/last-touch
Yemisirach Feb 25, 2023
d418c43
Update README.md
Kingno3l Feb 25, 2023
185f7f8
correct based on review
Yemisirach Feb 25, 2023
95256cb
Merge pull request #32 from Yemisirach/last-touch
Yemisirach Feb 25, 2023
3a74e21
Update README.md
Kingno3l Feb 27, 2023
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
7 changes: 7 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"env": {
"test": {
"plugins": ["@babel/plugin-transform-modules-commonjs"]
}
}
}
26 changes: 26 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"env": {
"browser": true,
"es6": true,
"jest": true
},
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"extends": ["airbnb-base"],
"rules": {
"no-shadow": "off",
"no-param-reassign": "off",
"eol-last": "off",
"import/extensions": [
1,
{
"js": "always",
"json": "always"
}
]
},
"ignorePatterns": ["dist/", "build/"]
}
58 changes: 58 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Linters

on: pull_request

env:
FORCE_COLOR: 1

jobs:
webhint:
name: Webhint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "12.x"
- name: Setup Webhint
run: |
npm install --save-dev hint@7.x
[ -f .hintrc ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/html-css-js/.hintrc
- name: Webhint Report
run: npx hint .
stylelint:
name: Stylelint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "12.x"
- name: Setup Stylelint
run: |
npm install --save-dev stylelint@13.x stylelint-scss@3.x stylelint-config-standard@21.x stylelint-csstree-validator@1.x
[ -f .stylelintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/html-css-js/.stylelintrc.json
- name: Stylelint Report
run: npx stylelint "**/*.{css,scss}"
eslint:
name: ESLint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "12.x"
- name: Setup ESLint
run: |
npm install --save-dev eslint@7.x eslint-config-airbnb-base@14.x eslint-plugin-import@2.x babel-eslint@10.x
[ -f .eslintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/html-css-js/.eslintrc.json
- name: ESLint Report
run: npx eslint .
nodechecker:
name: node_modules checker
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
18 changes: 18 additions & 0 deletions .hintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"connector": {
"name": "local",
"options": {
"pattern": ["**", "!.git/**", "!node_modules/**"]
}
},
"extends": ["development"],
"formatters": ["stylish"],
"hints": [
"button-type",
"disown-opener",
"html-checker",
"meta-charset-utf-8",
"meta-viewport",
"no-inline-styles:error"
]
}
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"]
}
Binary file added Image/bg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Image/calum-lewis-vA1L1jRTM70-unsplash.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Image/ellie-ellien-wg2xU_UNiVc-unsplash.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Image/mae-mu-rgRbqFweGF0-unsplash.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Image/new.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Image/nordwood-themes-Tmz8FThN_BE-unsplash.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
168 changes: 167 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,167 @@
# JavaScript-capstone-project
# JavaScript-capstone-project

# 📗 Table of Contents

- [Working with APIs](#working-with-apis)
- [📗 Table of Contents](#-table-of-contents)
- [📖 \[Working-with-APIs\] ](#-working-with-apis-)
- [🛠 Built With ](#-built-with-)
- [🖥️ Tech Stack ](#️-tech-stack-)
- [Key Features ](#key-features-)
- [🚀 Live Demo ](#-live-demo-)
- [💻 Getting Started ](#-getting-started-)
- [Prerequisites](#prerequisites)
- [Setup](#setup)
- [Install](#install)
- [Usage](#usage)
- [Run tests](#run-tests)
- [Deployment](#deployment)
- [👥 Authors ](#-authors-)
- [🔭 Future Features ](#-future-features-)
- [🔭 Watch Video Explanation here ](#-watch-video-explanation-here-)
- [🤝 Contributing ](#-contributing-)
- [⭐️ Show your support ](#️-show-your-support-)
- [🙏 Acknowledgments ](#-acknowledgments-)
- [📝 License ](#-license-)

# 📖 [Working-with-APIs] <a name="about-project"></a>

**# Working-with-APIs ** is a website that makes API calls

## 🛠 Built With <a name="HTML"></a>

### 🖥️ Tech Stack <a name="CSS"></a>

- HTML
- CSS
- JavaScript
- Webpack
- API

### Key Features <a name="Mobile Version of Portfolio"></a>

> Describe between 1-3 key features of the application.

- **Three page web application**
- **Use two API to display, store and update data**

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

## 🚀 Live Demo <a name="live-demo"></a>

- [Live Demo Link]()

Please note that the live demo link is not yet active

<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

In order to run this project you need:

- Go to this repsitory.
- Click on Code
- Clone the repository using your https link
- This will gives you access to all files

### Setup

Clone this repository to your desired folder:

- cd my-folder

- git clone git@github.com:Yemisirach/JavaScript-capstone-project.git

- Once done, open the index.html file in live server

### Install

Install this project with:

```sh
npm install
```

### Usage

Because this project uses webpack as a bundler, to run the project, execute the following command:

<code>npm run start</code>

- OR

<code>npm start</code>

### Run tests

To run tests, run the following command:

- npx stylelint "\*_/_.{css,scss}" in your terminal
- npx eslint . in your terminal

### Deployment

You can deploy this project using:

A web browser

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

## 👥 Authors <a name="authors"></a>

👤 **Yemisrach**

- GitHub: [@githubhandle](https://github.com/Yemisirach)

👤 **Mihretab**

- GitHub: [@githubhandle](https://github.com/damenam)

👤 **Kingno3l**

- GitHub: [@githubhandle](https://github.com/kingno3l)


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

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

- **Making API Calls**

## 🔭 Watch Video Explanation here <a name="video-demo"></a>

- **Watch explanation of the features** [here]()

<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](https://github.com/Yemisirach/JavaScript-capstone-project/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 follow my github.
- Give me star
- Say hi on twitter

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

## 🙏 Acknowledgments <a name="acknowledgements"></a>

I would like to thank Microverse

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

## 📝 License <a name="license"></a>

This project is [MIT](https://github.com/Yemisirach/JavaScript-capstone-project/blob/add-license-1/License) licensed.

<p align="right">(<a href="#readme-top">back to top</a>)</p>
1 change: 1 addition & 0 deletions __mocks__/fileMock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = 'test-file-stub';
1 change: 1 addition & 0 deletions __mocks__/styleMock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {};
21 changes: 21 additions & 0 deletions __test__/comment.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* @jest-environment jsdom
*/

import commentsCounter from '../src/Modules/commentCount.js';

describe('Counters', () => {
it('Comments counters', () => {
document.body.innerHTML = `<div class="left">
<p class="eachScore">
2022-09-09
<span>Nganje:</span>
</p>
<span>
<p class="numberSc">Great</p>
</span>
</div>`;
const count = document.querySelectorAll('.left');
expect(commentsCounter(count)).toBe(0);
});
});
13 changes: 13 additions & 0 deletions __test__/desplay.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* @jest-environment jsdom
*/

import mealsCounter from '../src/Modules/mealCounte.js';

describe('Counters', () => {
it('Comments counters', () => {
document.body.innerHTML = '<div id="meal-item" class="meal-item">meals (2)</div>';
const count = document.querySelectorAll('.meal-item');
expect(mealsCounter(count)).toBe(1);
});
});
Binary file added dist/be1f81866dca98a0bd9c.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/e9728e19cac71bff5f23.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading