Skip to content

Commit

Permalink
Improvements/gatsby 5 compatibility (#21)
Browse files Browse the repository at this point in the history
* Update gatsby required deps versions to 5.2.0

* Set gatsby required deps as ^4

* Set gatsby required deps as 4 - 5

* Revert "Set gatsby required deps as 4 - 5"

This reverts commit 31b2351.

* Revert "Set gatsby required deps as ^4"

This reverts commit 1cd8ddc.

* Update pnpm-lock.yaml

* set gatsby-source-* as peerDependencies on it's versions 4 - 5

* Add eslint 4 - 5 ass peerDependencies

* Update pnpm-lock.yaml

* Set peerDependencies versions as pipes

* Add some instructions to readme.md

Gatsby 4 and 5 instructions

* Rename readme file as README.md
  • Loading branch information
mcueto authored Jan 17, 2023
1 parent f9130e0 commit d76e514
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1,331 deletions.
17 changes: 15 additions & 2 deletions readme.md → README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
# gatsby-source-directus

Source plugin for pulling data into Gatsby from a Directus API.
Source plugin for pulling data into the [Gatsby GraphQL Data Layer](https://www.gatsbyjs.com/docs/reference/graphql-data-layer/) from a Directus API.

## Install

## 5️⃣ Installation for gatsby 4 and 5
Depending on the `gatsby` version you are using you will need to include the following dependencies to your project on these respective versions: `@4`if you are using `gatsby@4` and `@5` if you are using `gatsby@5`.

### gatsby@4 dependencies
```bash
npm install --save gatsby-source-graphql@4 gatsby-source-filesystem@4
```

### gatsby@5 dependencies
```bash
npm install --save gatsby-source-graphql@5 gatsby-source-filesystem@5
```

### Install the package
```bash
npm install --save @directus/gatsby-source-directus
```

Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@
],
"dependencies": {
"@directus/sdk": "10.2.0",
"gatsby-source-filesystem": "4.13.0",
"gatsby-source-graphql": "4.13.0",
"ms": "2.1.3"
},
"peerDependencies": {
"gatsby-source-filesystem": "4||5",
"gatsby-source-graphql": "4||5",
"eslint": "7||8"
},
"repository": "directus/gatsby-source-directus",
"bugs": {
"url": "https://github.com/directus/directus/issues"
Expand Down
Loading

0 comments on commit d76e514

Please sign in to comment.