Skip to content

Commit

Permalink
Merge pull request #4 from calendly/fix-output-dir-issue
Browse files Browse the repository at this point in the history
fixed issue where the output dir wasn't being created
  • Loading branch information
seankovacs authored Apr 30, 2021
2 parents 844d690 + 92e8125 commit e7d0679
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 e7d0679

Please sign in to comment.