Update gatsby-node.js

This commit is contained in:
2022-05-11 03:08:03 -04:00
parent ebea0e1c3c
commit 8dfc697af1
3 changed files with 3057 additions and 3860 deletions

3
.gitignore vendored
View File

@@ -1,3 +1,6 @@
node_modules/
.cache/
public
# ignore IDE
.idea/

18
gatsby-node.js Normal file
View File

@@ -0,0 +1,18 @@
exports.sourceNodes = ({ actions, createNodeId, createContentDigest }) => {
const pokemons = [
{ name: "Pikachu", type: "electric" },
{ name: "Squirtle", type: "water" },
]
pokemons.forEach(pokemon => {
const node = {
name: pokemon.name,
type: pokemon.type,
id: createNodeId(`Pokemon-${pokemon.name}`),
internal: {
type: "Pokemon",
contentDigest: createContentDigest(pokemon),
},
}
actions.createNode(node)
})
}

6896
package-lock.json generated

File diff suppressed because it is too large Load Diff