Skip to content

Commit

Permalink
Prettifying files
Browse files Browse the repository at this point in the history
  • Loading branch information
xaviemirmon committed May 23, 2021
1 parent cfbdf6e commit 67d1725
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 26 deletions.
41 changes: 20 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
Gatsby Pokédex
</h1>

This site is a testbed that show how Gatsby works and a fun project to play around with Pokémon. This site is a Progressive Web App (PWA) so you can install in on your device (if supported).
This site is a testbed that show how Gatsby works and a fun project to play around with Pokémon. This site is a Progressive Web App (PWA) so you can install in on your device (if supported).

## Demo

A demo of this project is available on <a href="https://pokedex.xavie.mirmon.co.uk" target="_blank">https://pokedex.xavie.mirmon.co.uk</a>

## Prerequisites
## Prerequisites

Node – 15.8.0

Expand Down Expand Up @@ -53,20 +53,20 @@ Yarn — 1.22.10

## Building the site

This site is hosted on [Gatsby Cloud](https://www.gatsbyjs.com/cloud/). You can fork this repo and to your Gatsby Cloud accuont to host it.
This site is hosted on [Gatsby Cloud](https://www.gatsbyjs.com/cloud/). You can fork this repo and to your Gatsby Cloud accuont to host it.

Should you wish to build and server it else run the following:

```shell
gatsby build
gatsby build
gatsby serve
```

## 🧐 What's inside?

1. **`/src/components/Footer.js`**: This file contains all of the logic for the `Footer` component including the links and text.

2. **`/src/components/Header.js`**: This file contains all of the logic for the `Header` component including the Pokédex logo and link.
2. **`/src/components/Header.js`**: This file contains all of the logic for the `Header` component including the Pokédex logo and link.

3. **`/src/components/Layout.js`**: This file contains all of the logic for the `Layout` component which is shared across all pages.

Expand All @@ -90,7 +90,6 @@ gatsby serve

13. **`gatsby-config.js`**: The file where all the plugin settings are configured including the mapping for the graphql endpoint.


## 🔗 Dependencies

1. **`@theme-ui/presets`**: Provides theme-ui presets so that we can load in and extend `Swiss`.
Expand All @@ -107,36 +106,36 @@ gatsby serve

7. **`gatsby-plugin-offline`**: Provides offline support for the PWA.

7. **`gatsby-plugin-react-helmet`**: `react-helmet` integration to bubble up information such as `<title>`, `<description>`, etc. information to the `<head>`.
8. **`gatsby-plugin-react-helmet`**: `react-helmet` integration to bubble up information such as `<title>`, `<description>`, etc. information to the `<head>`.

8. **`gatsby-plugin-sharp`**: Transforms the images for `gatsby-plugin-image`.
9. **`gatsby-plugin-sharp`**: Transforms the images for `gatsby-plugin-image`.

9. **`gatsby-plugin-theme-ui`**: Provide Gatsby integration for `theme-ui`.
10. **`gatsby-plugin-theme-ui`**: Provide Gatsby integration for `theme-ui`.

10. **`gatsby-source-filesystem`**: Allows Gatsby to source local files as nodes and use them in the GraphQL layer.
11. **`gatsby-source-filesystem`**: Allows Gatsby to source local files as nodes and use them in the GraphQL layer.

11. **`gatsby-source-graphql`**: Allows Gatsby to source GraphQL and use them in the GraphQL layer.
12. **`gatsby-source-graphql`**: Allows Gatsby to source GraphQL and use them in the GraphQL layer.

12. **`gatsby-transformer-sharp`**: Transforms the images for `gatsby-plugin-image`.
13. **`gatsby-transformer-sharp`**: Transforms the images for `gatsby-plugin-image`.

13. **`prop-types`**: Allows you to specify property types in your components.
14. **`prop-types`**: Allows you to specify property types in your components.

14. **`react`**: React...nuff said!
15. **`react`**: React...nuff said!

15. **`react-dom`**: React's virtual DOM where all the fancy tree updates happen.
16. **`react-dom`**: React's virtual DOM where all the fancy tree updates happen.

16. **`react-helmet`**: Bubbles up information such as `<title>`, `<description>`, etc. information to the `<head>`.
17. **`react-helmet`**: Bubbles up information such as `<title>`, `<description>`, etc. information to the `<head>`.

17. **`theme-ui`**: Provides a themeing layer based on Emotion.
18. **`theme-ui`**: Provides a themeing layer based on Emotion.

## 🧪 Testing

1. **`jest`**: provides examples of unit tests. Run `yarn test:jest` to perform the tests in the `__tests__` directories.
1. **`jest`**: provides examples of unit tests. Run `yarn test:jest` to perform the tests in the `__tests__` directories.

2. **`cypress`**: provides examples of e2e tests. Run `yarn test:cy` to perform the tests in the `cypress` directory which also perform accessiblity checks using the axe library. Note: you need have the site running in development mode `gatsby develop`.
2. **`cypress`**: provides examples of e2e tests. Run `yarn test:cy` to perform the tests in the `cypress` directory which also perform accessiblity checks using the axe library. Note: you need have the site running in development mode `gatsby develop`.

3. **`Google Lighthouse`**: Google Lighthouse is performed on each deploy Gatsby Cloud. The latest deployment has a 99 performance score!
<img alt="Gatsby" src="https://pokedex.xavie.mirmon.co.uk/Lighthouse.png" />
3. **`Google Lighthouse`**: Google Lighthouse is performed on each deploy Gatsby Cloud. The latest deployment has a 99 performance score!
<img alt="Gatsby" src="https://pokedex.xavie.mirmon.co.uk/Lighthouse.png" />

## 🛣 Roadmap V2

Expand Down
7 changes: 6 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ module.exports = {
".+\\.(css|styl|less|sass|scss)$": `identity-obj-proxy`,
".+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": `<rootDir>/tests/__mocks__/file-mock.js`,
},
testPathIgnorePatterns: [`node_modules`, `\\.cache`, `<rootDir>.*/public`, `<rootDir>.*/cypress` ],
testPathIgnorePatterns: [
`node_modules`,
`\\.cache`,
`<rootDir>.*/public`,
`<rootDir>.*/cypress`,
],
transformIgnorePatterns: [`node_modules/(?!(gatsby)/)`],
globals: {
__PATH_PREFIX__: ``,
Expand Down
4 changes: 2 additions & 2 deletions src/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ const Header = () => (
textAlign: "center",
}}
>
<Link
<Link
to="/"
sx={{
fontSize: `0px`
fontSize: `0px`,
}}
>
<StaticImage
Expand Down
2 changes: 1 addition & 1 deletion src/components/SearchList.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const SearchList = () => {
16
)

// Function to build out the
// Function to build out the pagination
const paginationLinks = (number, current_page) => {
let elements = []
for (let i = 1; i <= number; i++) {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const IndexPage = () => (
as="h1"
sx={{
margin: 0,
fontSize: `0px`
fontSize: `0px`,
}}
data-testid="index-heading"
>
Expand Down

0 comments on commit 67d1725

Please sign in to comment.