Skip to content

Commit

Permalink
[1.0] refactor node structure to hide internal fields (gatsbyjs#960)
Browse files Browse the repository at this point in the history
* Initial refactor done

* Remove unused code

* Some fixes

* Bump site version number cause it's getting better and stuff

* Fix source-drupal plugin

* Add basic documentation for node interface and hacker news source plugin
  • Loading branch information
KyleAMathews committed May 15, 2017
1 parent fdd7621 commit 2075d86
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ function readFile(file, pluginOptions, cb) {
// people will use the id for that and ids shouldn't be treated as
// useful information.
id: createId(file),
contentDigest: contentDigest,
children: [],
parent: `___SOURCE___`,
mediaType: mime.lookup(slashedFile.ext),
type: `File`,
sourceName: pluginOptions.name,
internal: {
contentDigest: contentDigest,
mediaType: mime.lookup(slashedFile.ext),
type: `File`,
},
sourceInstanceName: pluginOptions.name,
absolutePath: slashedFile.absolutePath,
relativePath: slash(
path.relative(pluginOptions.path, slashedFile.absolutePath)
Expand Down

0 comments on commit 2075d86

Please sign in to comment.