From 1f6219aa81ebc953e5f47c70bf1c7ab57c300088 Mon Sep 17 00:00:00 2001 From: shijun Wei <191796158@qq.com> Date: Fri, 6 Nov 2020 14:42:27 +0800 Subject: [PATCH 1/3] Update index.js --- index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/index.js b/index.js index 172f1ae..e50ead3 100644 --- a/index.js +++ b/index.js @@ -1 +1,8 @@ // noop +const fs = require(`fs-extra`) + +function loadNodeContent(fileNode) { + return fs.readFile(fileNode.absolutePath, `utf-8`) +} + +exports.loadNodeContent = loadNodeContent From fafb411b6bbe99520122ef8a401a8f1605370d95 Mon Sep 17 00:00:00 2001 From: shijun Wei <191796158@qq.com> Date: Fri, 6 Nov 2020 14:43:00 +0800 Subject: [PATCH 2/3] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bf7f942..92bf2cb 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "homepage": "https://github.com/stevetweeddale/gatsby-source-git#readme", "dependencies": { "fast-glob": "^2.2.3", - "fs-extra": "^5.0.0", + "fs-extra": "^8.1.0", "gatsby-source-filesystem": "^2.1.19", "git-url-parse": "^11.1.1", "rimraf": "^2.6.2", From 69046b3e1ef11845939a0e4bb6792692f6aa5eb9 Mon Sep 17 00:00:00 2001 From: shijun Wei <191796158@qq.com> Date: Fri, 6 Nov 2020 14:55:43 +0800 Subject: [PATCH 3/3] Update gatsby-node.js --- gatsby-node.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gatsby-node.js b/gatsby-node.js index eedfc0e..fa7aa74 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -105,9 +105,7 @@ exports.sourceNodes = async ( fileNode.gitRemote___NODE = remoteId; // Then create the node, as if it were created by the gatsby-source // filesystem plugin. - return createNode(fileNode, { - name: `gatsby-source-filesystem` - }); + return createNode(fileNode); }); };