Skip to content

Commit 89d5575

Browse files
authored
chore(deps): Update the plugin to Gatsby v5 (#643)
chore(deps): Update the plugin to Gatsby v5 ✅ Closes: #642
1 parent 9ad9220 commit 89d5575

25 files changed

+12660
-21841
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@
3939
"@babel/runtime": "^7.4.3"
4040
},
4141
"peerDependencies": {
42-
"gatsby": "^2.0.0 || ^3.0.0 || ^4.0.0"
42+
"gatsby": "^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0"
4343
}
4444
}
Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,3 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
8-
# Runtime data
9-
pids
10-
*.pid
11-
*.seed
12-
*.pid.lock
13-
14-
# Directory for instrumented libs generated by jscoverage/JSCover
15-
lib-cov
16-
17-
# Coverage directory used by tools like istanbul
18-
coverage
19-
20-
# nyc test coverage
21-
.nyc_output
22-
23-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24-
.grunt
25-
26-
# Bower dependency directory (https://bower.io/)
27-
bower_components
28-
29-
# node-waf configuration
30-
.lock-wscript
31-
32-
# Compiled binary addons (http://nodejs.org/api/addons.html)
33-
build/Release
34-
35-
# Dependency directories
361
node_modules/
37-
jspm_packages/
38-
39-
# Typescript v1 declaration files
40-
typings/
41-
42-
# Optional npm cache directory
43-
.npm
44-
45-
# Optional eslint cache
46-
.eslintcache
47-
48-
# Optional REPL history
49-
.node_repl_history
50-
51-
# Output of 'npm pack'
52-
*.tgz
53-
54-
# dotenv environment variable files
55-
.env*
56-
57-
# gatsby files
582
.cache/
593
public
60-
61-
# Mac files
62-
.DS_Store
63-
64-
# Yarn
65-
yarn-error.log
66-
.pnp/
67-
.pnp.js
68-
# Yarn Integrity file
69-
.yarn-integrity

test-projects/base-configuration-test/.prettierignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

test-projects/base-configuration-test/.prettierrc

Lines changed: 0 additions & 4 deletions
This file was deleted.

test-projects/base-configuration-test/LICENSE

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 21 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,105 +1,54 @@
1-
<!-- AUTO-GENERATED-CONTENT:START (STARTER) -->
21
<p align="center">
3-
<a href="https://www.gatsbyjs.com">
2+
<a href="https://www.gatsbyjs.com/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter">
43
<img alt="Gatsby" src="https://www.gatsbyjs.com/Gatsby-Monogram.svg" width="60" />
54
</a>
65
</p>
76
<h1 align="center">
8-
Gatsby's default starter
7+
Gatsby minimal starter
98
</h1>
109

11-
Kick off your project with this default boilerplate. This starter ships with the main Gatsby configuration files you might need to get up and running blazing fast with the blazing fast app generator for React.
12-
13-
_Have another more specific idea? You may want to check out our vibrant collection of [official and community-created starters](https://www.gatsbyjs.com/docs/gatsby-starters/)._
14-
1510
## 🚀 Quick start
1611

1712
1. **Create a Gatsby site.**
1813

19-
Use the Gatsby CLI ([install instructions](https://www.gatsbyjs.com/docs/tutorial/part-0/#gatsby-cli)) to create a new site, specifying the default starter.
14+
Use the Gatsby CLI to create a new site, specifying the minimal starter.
2015

2116
```shell
22-
# create a new Gatsby site using the default starter
23-
gatsby new my-default-starter https://github.com/gatsbyjs/gatsby-starter-default
17+
# create a new Gatsby site using the minimal starter
18+
npm init gatsby
2419
```
2520

26-
1. **Start developing.**
21+
2. **Start developing.**
2722

2823
Navigate into your new site’s directory and start it up.
2924

3025
```shell
31-
cd my-default-starter/
32-
gatsby develop
26+
cd my-gatsby-site/
27+
npm run develop
3328
```
3429

35-
1. **Open the source code and start editing!**
36-
37-
Your site is now running at `http://localhost:8000`!
38-
39-
_Note: You'll also see a second link: _`http://localhost:8000/___graphql`_. This is a tool you can use to experiment with querying your data. Learn more about using this tool in the [Gatsby Tutorial](https://www.gatsbyjs.com/docs/tutorial/part-4/#use-graphiql-to-explore-the-data-layer-and-write-graphql-queries)._
40-
41-
Open the `my-default-starter` directory in your code editor of choice and edit `src/pages/index.js`. Save your changes and the browser will update in real time!
42-
43-
## 🚀 Quick start (Gatsby Cloud)
44-
45-
Deploy this starter with one click on [Gatsby Cloud](https://www.gatsbyjs.com/cloud/):
46-
47-
[<img src="https://www.gatsbyjs.com/deploynow.svg" alt="Deploy to Gatsby Cloud">](https://www.gatsbyjs.com/dashboard/deploynow?url=https://github.com/gatsbyjs/gatsby-starter-default)
48-
49-
## 🧐 What's inside?
50-
51-
A quick look at the top-level files and directories you'll see in a Gatsby project.
30+
3. **Open the code and start customizing!**
5231

53-
.
54-
├── node_modules
55-
├── src
56-
├── .gitignore
57-
├── .prettierrc
58-
├── gatsby-browser.js
59-
├── gatsby-config.js
60-
├── gatsby-node.js
61-
├── gatsby-ssr.js
62-
├── LICENSE
63-
├── package-lock.json
64-
├── package.json
65-
└── README.md
32+
Your site is now running at http://localhost:8000!
6633

67-
1. **`/node_modules`**: This directory contains all of the modules of code that your project depends on (npm packages) are automatically installed.
34+
Edit `src/pages/index.js` to see your site update in real-time!
6835

69-
2. **`/src`**: This directory will contain all of the code related to what you will see on the front-end of your site (what you see in the browser) such as your site header or a page template. `src` is a convention for “source code”.
36+
4. **Learn more**
7037

71-
3. **`.gitignore`**: This file tells git which files it should not track / not maintain a version history for.
38+
- [Documentation](https://www.gatsbyjs.com/docs/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter)
7239

73-
4. **`.prettierrc`**: This is a configuration file for [Prettier](https://prettier.io/). Prettier is a tool to help keep the formatting of your code consistent.
40+
- [Tutorials](https://www.gatsbyjs.com/tutorial/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter)
7441

75-
5. **`gatsby-browser.js`**: This file is where Gatsby expects to find any usage of the [Gatsby browser APIs](https://www.gatsbyjs.com/docs/reference/config-files/gatsby-browser/) (if any). These allow customization/extension of default Gatsby settings affecting the browser.
42+
- [Guides](https://www.gatsbyjs.com/tutorial/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter)
7643

77-
6. **`gatsby-config.js`**: This is the main configuration file for a Gatsby site. This is where you can specify information about your site (metadata) like the site title and description, which Gatsby plugins you’d like to include, etc. (Check out the [config docs](https://www.gatsbyjs.com/docs/reference/config-files/gatsby-config/) for more detail).
44+
- [API Reference](https://www.gatsbyjs.com/docs/api-reference/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter)
7845

79-
7. **`gatsby-node.js`**: This file is where Gatsby expects to find any usage of the [Gatsby Node APIs](https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/) (if any). These allow customization/extension of default Gatsby settings affecting pieces of the site build process.
46+
- [Plugin Library](https://www.gatsbyjs.com/plugins?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter)
8047

81-
8. **`gatsby-ssr.js`**: This file is where Gatsby expects to find any usage of the [Gatsby server-side rendering APIs](https://www.gatsbyjs.com/docs/reference/config-files/gatsby-ssr/) (if any). These allow customization of default Gatsby settings affecting server-side rendering.
48+
- [Cheat Sheet](https://www.gatsbyjs.com/docs/cheat-sheet/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter)
8249

83-
9. **`LICENSE`**: This Gatsby starter is licensed under the 0BSD license. This means that you can see this file as a placeholder and replace it with your own license.
84-
85-
10. **`package-lock.json`** (See `package.json` below, first). This is an automatically generated file based on the exact versions of your npm dependencies that were installed for your project. **(You won’t change this file directly).**
86-
87-
11. **`package.json`**: A manifest file for Node.js projects, which includes things like metadata (the project’s name, author, etc). This manifest is how npm knows which packages to install for your project.
88-
89-
12. **`README.md`**: A text file containing useful reference information about your project.
90-
91-
## 🎓 Learning Gatsby
92-
93-
Looking for more guidance? Full documentation for Gatsby lives [on the website](https://www.gatsbyjs.com/). Here are some places to start:
94-
95-
- **For most developers, we recommend starting with our [in-depth tutorial for creating a site with Gatsby](https://www.gatsbyjs.com/tutorial/).** It starts with zero assumptions about your level of ability and walks through every step of the process.
96-
97-
- **To dive straight into code samples, head [to our documentation](https://www.gatsbyjs.com/docs/).** In particular, check out the _Guides_, _API Reference_, and _Advanced Tutorials_ sections in the sidebar.
98-
99-
## 💫 Deploy
100-
101-
[Build, Deploy, and Host On The Only Cloud Built For Gatsby](https://www.gatsbyjs.com/products/cloud/)
50+
## 🚀 Quick start (Gatsby Cloud)
10251

103-
Gatsby Cloud is an end-to-end cloud platform specifically built for the Gatsby framework that combines a modern developer experience with an optimized, global edge network.
52+
Deploy this starter with one click on [Gatsby Cloud](https://www.gatsbyjs.com/cloud/):
10453

105-
<!-- AUTO-GENERATED-CONTENT:END -->
54+
[<img src="https://www.gatsbyjs.com/deploynow.svg" alt="Deploy to Gatsby Cloud">](https://www.gatsbyjs.com/dashboard/deploynow?url=https://github.com/gatsbyjs/gatsby-starter-minimal)

test-projects/base-configuration-test/gatsby-browser.js

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 7 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,17 @@
1+
/**
2+
* @type {import('gatsby').GatsbyConfig}
3+
*/
14
module.exports = {
25
siteMetadata: {
3-
title: `Gatsby Default Starter`,
4-
description: `Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gatsby configuration files you might need.`,
5-
author: `@gatsbyjs`,
6-
siteUrl: `https://gatsbystarterdefaultsource.gatsbyjs.io/`,
6+
title: `base-configuration-test`,
7+
siteUrl: `https://www.yourdomain.tld`,
78
},
89
plugins: [
9-
`gatsby-plugin-react-helmet`,
10-
`gatsby-plugin-image`,
1110
{
12-
resolve: `gatsby-source-filesystem`,
11+
resolve: 'gatsby-plugin-preconnect',
1312
options: {
14-
name: `images`,
15-
path: `${__dirname}/src/images`,
13+
domains: ['https://foo.com', 'https://bar.com'],
1614
},
1715
},
18-
`gatsby-transformer-sharp`,
19-
`gatsby-plugin-sharp`,
20-
{
21-
resolve: `gatsby-plugin-manifest`,
22-
options: {
23-
name: `gatsby-starter-default`,
24-
short_name: `starter`,
25-
start_url: `/`,
26-
background_color: `#663399`,
27-
// This will impact how browsers show your PWA/website
28-
// https://css-tricks.com/meta-theme-color-and-trickery/
29-
// theme_color: `#663399`,
30-
display: `minimal-ui`,
31-
icon: `src/images/gatsby-icon.png`, // This path is relative to the root of the site.
32-
},
33-
},
34-
{
35-
resolve: "gatsby-plugin-preconnect",
36-
options: {
37-
domains: ["https://foo.com", "https://bar.com"],
38-
},
39-
},
40-
// this (optional) plugin enables Progressive Web App + Offline functionality
41-
// To learn more, visit: https://gatsby.dev/offline
42-
// `gatsby-plugin-offline`,
4316
],
4417
}

test-projects/base-configuration-test/gatsby-node.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

test-projects/base-configuration-test/gatsby-ssr.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)