Skip to content

Commit

Permalink
use pathJoin from gatsby-core-utils
Browse files Browse the repository at this point in the history
  • Loading branch information
wardpeet committed Jul 5, 2019
1 parent 8d52445 commit d0fa195
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 22 deletions.
12 changes: 1 addition & 11 deletions themes/gatsby-theme-blog/gatsby-node.js
Expand Up @@ -3,17 +3,7 @@ const path = require(`path`)
const mkdirp = require(`mkdirp`)
const crypto = require(`crypto`)
const Debug = require(`debug`)

let joinPath
try {
joinPath = require(`gatsby/utils`).joinPath
} catch (err) {
// continue regardless of error
}

if (!joinPath) {
joinPath = (...paths) => paths.join(`/`).replace(/\/{2,}/g, `/`)
}
const { joinPath } = require(`gatsby-core-utils`)

const debug = Debug(`gatsby-theme-blog`)

Expand Down
1 change: 1 addition & 0 deletions themes/gatsby-theme-blog/package.json
Expand Up @@ -17,6 +17,7 @@
"@mdx-js/react": "^1.0.21",
"@theme-ui/prism": "^0.2.5",
"@theme-ui/typography": "^0.2.5",
"gatsby-core-utils": "^1.0.0",
"gatsby-image": "^2.2.4",
"gatsby-plugin-emotion": "^4.1.0",
"gatsby-plugin-feed": "^2.3.2",
Expand Down
12 changes: 1 addition & 11 deletions themes/gatsby-theme-notes/gatsby-node.js
Expand Up @@ -3,17 +3,7 @@ const path = require(`path`)
const mkdirp = require(`mkdirp`)
const crypto = require(`crypto`)
const Debug = require(`debug`)

let joinPath
try {
joinPath = require(`gatsby/utils`).joinPath
} catch (err) {
// continue regardless of error
}

if (!joinPath) {
joinPath = (...paths) => paths.join(`/`).replace(/\/{2,}/g, `/`)
}
const { joinPath } = require(`gatsby-core-utils`)

const debug = Debug(`gatsby-theme-notes`)

Expand Down
1 change: 1 addition & 0 deletions themes/gatsby-theme-notes/package.json
Expand Up @@ -27,6 +27,7 @@
"@emotion/core": "^10.0.14",
"@mdx-js/mdx": "^1.0.21",
"@mdx-js/react": "^1.0.21",
"gatsby-core-utils": "^1.0.0",
"gatsby-plugin-compile-es6-packages": "^1.1.0",
"gatsby-plugin-emotion": "^4.1.0",
"gatsby-plugin-mdx": "^1.0.7",
Expand Down

0 comments on commit d0fa195

Please sign in to comment.