feat(guide): Import guide in to the client app

This commit is contained in:
Bouncey
2018-10-04 14:47:55 +01:00
committed by Stuart Taylor
parent 2723a943c9
commit 6e728ce16d
4338 changed files with 148283 additions and 4200 deletions

View File

@ -0,0 +1,16 @@
exports.onCreateNode = ({ node, reporter }, { predicate, identity }) => {
if (typeof predicate !== 'function') {
reporter.panic(
'Please supply a predicate function to `gatsby-plugin-identity`'
);
}
if (typeof identity !== 'string' || identity.lenght === 0) {
reporter.panic(
'`gatsby-plugin-identity` requires an identify string to add to nodes ' +
'that match the predicate'
);
}
if (predicate(node)) {
node.internal.identity = identity;
}
};

View File

@ -0,0 +1 @@
{"name": "gatsby-plugin-node-identity", "version": "0.1.0"}