Skip to content

Commit

Permalink
fixed issue where the output dir wasn't being created
Browse files Browse the repository at this point in the history
  • Loading branch information
seankovacs committed Apr 30, 2021
1 parent 844d690 commit 92e8125
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gatsby-plugin-guru-export",
"description": "Creates an Guru export for your Gatsby site.",
"version": "0.2.0",
"version": "0.2.1",
"author": "Sean Kovacs <[email protected]>",
"bugs": {
"url": "https://github.com/calendly/gatsby-plugin-guru-export"
Expand Down
5 changes: 1 addition & 4 deletions src/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@ exports.onPostBuild = async ({ graphql }, pluginOptions) => {

const feedData = serialize({ query });
const outputPath = path.join(publicPath, output);
const outputDir = path.dirname(outputPath);
if (!(await fs.exists(outputDir))) {
await fs.mkdirp(outputDir);
}
await fs.ensureDir(outputPath);

for (let i = 0; i < feedData.length; i++) {
const data = feedData[i];
Expand Down

0 comments on commit 92e8125

Please sign in to comment.