Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const createAndProcessNode = path => {
return createFileNode(path, createNodeId, {
name: name,
path: localPath
}).then(fileNode => {
// Add a link to the git remote node
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`
});
});
};