Skip to content

Commit

Permalink
Adds gatsby-plugin-react-next and two moduleNameMapper after getting …
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminhoffman committed Sep 16, 2018
1 parent 012614b commit ecb09da
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ module.exports = {
siteMetadata: {
title: 'Gatsby Default Starter',
},
plugins: ['gatsby-plugin-react-helmet'],
plugins: ['gatsby-plugin-react-next', 'gatsby-plugin-react-helmet'],
}
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,14 @@
"testRegex": "/.*(__tests__\\/.*)|(.*(test|spec))\\.jsx?$",
"moduleNameMapper": {
".+\\.(css|styl|less|sass|scss)$": "identity-obj-proxy",
".+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js"
".+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js",
"^react$": "gatsby-plugin-react-next/node_modules/react",
"^react-dom$": "gatsby-plugin-react-next/node_modules/react-dom"
},
"testPathIgnorePatterns": ["node_modules", ".cache"],
"testPathIgnorePatterns": [
"node_modules",
".cache"
],
"transformIgnorePatterns": [
"node_modules/(?!(gatsby)/)"
],
Expand All @@ -48,6 +53,7 @@
"@babel/preset-react": "^7.0.0",
"babel-core": "^7.0.0-0",
"babel-jest": "^23.6.0",
"gatsby-plugin-react-next": "^1.0.11",
"identity-obj-proxy": "^3.0.0",
"jest": "^23.6.0",
"prettier": "^1.13.7",
Expand Down
32 changes: 32 additions & 0 deletions src/components/__snapshots__/header.test.js.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Header renders correctly 1`] = `
<div
style={
Object {
"background": "rebeccapurple",
"marginBottom": "1.45rem",
}
}
>
<div
style={
Object {
"margin": "0 auto",
"maxWidth": 960,
"padding": "1.45rem 1.0875rem",
}
}
>
<h1
style={
Object {
"margin": 0,
}
}
>
Hello, my name is ben
</h1>
</div>
</div>
`;
29 changes: 28 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2622,7 +2622,7 @@ core-js@^1.0.0, core-js@^1.2.6:
version "1.2.7"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636"

core-js@^2.4.0, core-js@^2.5.0:
core-js@^2.4.0, core-js@^2.5.0, core-js@^2.5.1:
version "2.5.7"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e"

Expand Down Expand Up @@ -3963,6 +3963,15 @@ gatsby-plugin-react-helmet@^2.0.11:
dependencies:
babel-runtime "^6.26.0"

gatsby-plugin-react-next@^1.0.11:
version "1.0.11"
resolved "https://registry.yarnpkg.com/gatsby-plugin-react-next/-/gatsby-plugin-react-next-1.0.11.tgz#715cab5ea86f64664f96af3e7f3640eecd9de5e3"
dependencies:
babel-runtime "^6.26.0"
core-js "^2.5.1"
react "^16.0.0"
react-dom "^16.0.0"

gatsby-react-router-scroll@^1.0.18:
version "1.0.18"
resolved "https://registry.yarnpkg.com/gatsby-react-router-scroll/-/gatsby-react-router-scroll-1.0.18.tgz#616ffb801dbdbe4598611e2ff3861b91ac3eecbf"
Expand Down Expand Up @@ -7619,6 +7628,15 @@ react-dom@^15.6.0:
object-assign "^4.1.0"
prop-types "^15.5.10"

react-dom@^16.0.0:
version "16.5.1"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.5.1.tgz#29d0c5a01ed3b6b4c14309aa91af6ec4eb4f292c"
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"
prop-types "^15.6.2"
schedule "^0.4.0"

react-error-overlay@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-3.0.0.tgz#c2bc8f4d91f1375b3dad6d75265d51cd5eeaf655"
Expand Down Expand Up @@ -7701,6 +7719,15 @@ react@^15.6.0:
object-assign "^4.1.0"
prop-types "^15.5.10"

react@^16.0.0:
version "16.5.1"
resolved "https://registry.yarnpkg.com/react/-/react-16.5.1.tgz#8cb8e9f8cdcb4bde41c9a138bfbf907e66132372"
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"
prop-types "^15.6.2"
schedule "^0.4.0"

read-cache@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/read-cache/-/read-cache-1.0.0.tgz#e664ef31161166c9751cdbe8dbcf86b5fb58f774"
Expand Down

0 comments on commit ecb09da

Please sign in to comment.