Skip to content

Commit

Permalink
help
Browse files Browse the repository at this point in the history
  • Loading branch information
dereknelson committed Feb 18, 2019
1 parent 5c5e9c4 commit 9bf1fa2
Show file tree
Hide file tree
Showing 125 changed files with 12,295 additions and 615 deletions.
12 changes: 6 additions & 6 deletions .cache/__tests__/__snapshots__/static-entry.js.snap
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`develop-static-entry onPreRenderHTML can be used to replace headComponents 1`] = `"<!DOCTYPE html><html><head><meta charSet=\\"utf-8\\"/><meta http-equiv=\\"x-ua-compatible\\" content=\\"ie=edge\\"/><meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1, shrink-to-fit=no\\"/><style>.style3 </style><style>.style2 </style><style>.style1 </style><script src=\\"/socket.io/socket.io.js\\"></script></head><body><div id=\\"___gatsby\\"></div><script src=\\"/commons.js\\"></script></body></html>"`;
exports[`develop-static-entry onPreRenderHTML can be used to replace headComponents 1`] = `"<!DOCTYPE html><html><head><meta charSet=\\"utf-8\\"/><meta http-equiv=\\"x-ua-compatible\\" content=\\"ie=edge\\"/><meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1, shrink-to-fit=no\\"/><style>.style3 </style><style>.style2 </style><style>.style1 </style><script src=\\"/socket.io/socket.io.js\\"></script></head><body><noscript id=\\"gatsby-noscript\\">This app works best with JavaScript enabled.</noscript><div id=\\"___gatsby\\"></div><script src=\\"/commons.js\\"></script></body></html>"`;
exports[`develop-static-entry onPreRenderHTML can be used to replace postBodyComponents 1`] = `"<!DOCTYPE html><html><head><meta charSet=\\"utf-8\\"/><meta http-equiv=\\"x-ua-compatible\\" content=\\"ie=edge\\"/><meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1, shrink-to-fit=no\\"/><script src=\\"/socket.io/socket.io.js\\"></script></head><body><div id=\\"___gatsby\\"></div><div>div3</div><div>div2</div><div>div1</div><script src=\\"/commons.js\\"></script></body></html>"`;
exports[`develop-static-entry onPreRenderHTML can be used to replace postBodyComponents 1`] = `"<!DOCTYPE html><html><head><meta charSet=\\"utf-8\\"/><meta http-equiv=\\"x-ua-compatible\\" content=\\"ie=edge\\"/><meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1, shrink-to-fit=no\\"/><script src=\\"/socket.io/socket.io.js\\"></script></head><body><noscript id=\\"gatsby-noscript\\">This app works best with JavaScript enabled.</noscript><div id=\\"___gatsby\\"></div><div>div3</div><div>div2</div><div>div1</div><script src=\\"/commons.js\\"></script></body></html>"`;
exports[`develop-static-entry onPreRenderHTML can be used to replace preBodyComponents 1`] = `"<!DOCTYPE html><html><head><meta charSet=\\"utf-8\\"/><meta http-equiv=\\"x-ua-compatible\\" content=\\"ie=edge\\"/><meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1, shrink-to-fit=no\\"/><script src=\\"/socket.io/socket.io.js\\"></script></head><body><div>div3</div><div>div2</div><div>div1</div><div id=\\"___gatsby\\"></div><script src=\\"/commons.js\\"></script></body></html>"`;
exports[`develop-static-entry onPreRenderHTML can be used to replace preBodyComponents 1`] = `"<!DOCTYPE html><html><head><meta charSet=\\"utf-8\\"/><meta http-equiv=\\"x-ua-compatible\\" content=\\"ie=edge\\"/><meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1, shrink-to-fit=no\\"/><script src=\\"/socket.io/socket.io.js\\"></script></head><body><div>div3</div><div>div2</div><div>div1</div><noscript id=\\"gatsby-noscript\\">This app works best with JavaScript enabled.</noscript><div id=\\"___gatsby\\"></div><script src=\\"/commons.js\\"></script></body></html>"`;
exports[`static-entry onPreRenderHTML can be used to replace headComponents 1`] = `"<!DOCTYPE html><html><head><meta charSet=\\"utf-8\\"/><meta http-equiv=\\"x-ua-compatible\\" content=\\"ie=edge\\"/><meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1, shrink-to-fit=no\\"/><style>.style3 </style><style>.style2 </style><style>.style1 </style><meta name=\\"generator\\" content=\\"Gatsby 2.0.0\\"/></head><body><div id=\\"___gatsby\\"><div style=\\"outline:none\\" tabindex=\\"-1\\" role=\\"group\\"></div></div><script id=\\"gatsby-script-loader\\">/*<![CDATA[*/window.page={\\"path\\":\\"/about/\\",\\"componentChunkName\\":\\"page-component---src-pages-test-js\\",\\"jsonName\\":\\"about.json\\"};/*]]>*/</script><script id=\\"gatsby-chunk-mapping\\">/*<![CDATA[*/window.___chunkMapping={};/*]]>*/</script></body></html>"`;
exports[`static-entry onPreRenderHTML can be used to replace headComponents 1`] = `"<!DOCTYPE html><html><head><meta charSet=\\"utf-8\\"/><meta http-equiv=\\"x-ua-compatible\\" content=\\"ie=edge\\"/><meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1, shrink-to-fit=no\\"/><style>.style3 </style><style>.style2 </style><style>.style1 </style><meta name=\\"generator\\" content=\\"Gatsby 2.0.0\\"/></head><body><noscript id=\\"gatsby-noscript\\">This app works best with JavaScript enabled.</noscript><div id=\\"___gatsby\\"><div style=\\"outline:none\\" tabindex=\\"-1\\" role=\\"group\\"></div></div><script id=\\"gatsby-script-loader\\">/*<![CDATA[*/window.page={\\"path\\":\\"/about/\\",\\"componentChunkName\\":\\"page-component---src-pages-test-js\\",\\"jsonName\\":\\"about.json\\"};/*]]>*/</script><script id=\\"gatsby-chunk-mapping\\">/*<![CDATA[*/window.___chunkMapping={};/*]]>*/</script></body></html>"`;
exports[`static-entry onPreRenderHTML can be used to replace postBodyComponents 1`] = `"<!DOCTYPE html><html><head><meta charSet=\\"utf-8\\"/><meta http-equiv=\\"x-ua-compatible\\" content=\\"ie=edge\\"/><meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1, shrink-to-fit=no\\"/><meta name=\\"generator\\" content=\\"Gatsby 2.0.0\\"/></head><body><div id=\\"___gatsby\\"><div style=\\"outline:none\\" tabindex=\\"-1\\" role=\\"group\\"></div></div><script id=\\"gatsby-chunk-mapping\\">/*<![CDATA[*/window.___chunkMapping={};/*]]>*/</script><script id=\\"gatsby-script-loader\\">/*<![CDATA[*/window.page={\\"path\\":\\"/about/\\",\\"componentChunkName\\":\\"page-component---src-pages-test-js\\",\\"jsonName\\":\\"about.json\\"};/*]]>*/</script><div>div3</div><div>div2</div><div>div1</div></body></html>"`;
exports[`static-entry onPreRenderHTML can be used to replace postBodyComponents 1`] = `"<!DOCTYPE html><html><head><meta charSet=\\"utf-8\\"/><meta http-equiv=\\"x-ua-compatible\\" content=\\"ie=edge\\"/><meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1, shrink-to-fit=no\\"/><meta name=\\"generator\\" content=\\"Gatsby 2.0.0\\"/></head><body><noscript id=\\"gatsby-noscript\\">This app works best with JavaScript enabled.</noscript><div id=\\"___gatsby\\"><div style=\\"outline:none\\" tabindex=\\"-1\\" role=\\"group\\"></div></div><script id=\\"gatsby-chunk-mapping\\">/*<![CDATA[*/window.___chunkMapping={};/*]]>*/</script><script id=\\"gatsby-script-loader\\">/*<![CDATA[*/window.page={\\"path\\":\\"/about/\\",\\"componentChunkName\\":\\"page-component---src-pages-test-js\\",\\"jsonName\\":\\"about.json\\"};/*]]>*/</script><div>div3</div><div>div2</div><div>div1</div></body></html>"`;
exports[`static-entry onPreRenderHTML can be used to replace preBodyComponents 1`] = `"<!DOCTYPE html><html><head><meta charSet=\\"utf-8\\"/><meta http-equiv=\\"x-ua-compatible\\" content=\\"ie=edge\\"/><meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1, shrink-to-fit=no\\"/><meta name=\\"generator\\" content=\\"Gatsby 2.0.0\\"/></head><body><div>div3</div><div>div2</div><div>div1</div><div id=\\"___gatsby\\"><div style=\\"outline:none\\" tabindex=\\"-1\\" role=\\"group\\"></div></div><script id=\\"gatsby-script-loader\\">/*<![CDATA[*/window.page={\\"path\\":\\"/about/\\",\\"componentChunkName\\":\\"page-component---src-pages-test-js\\",\\"jsonName\\":\\"about.json\\"};/*]]>*/</script><script id=\\"gatsby-chunk-mapping\\">/*<![CDATA[*/window.___chunkMapping={};/*]]>*/</script></body></html>"`;
exports[`static-entry onPreRenderHTML can be used to replace preBodyComponents 1`] = `"<!DOCTYPE html><html><head><meta charSet=\\"utf-8\\"/><meta http-equiv=\\"x-ua-compatible\\" content=\\"ie=edge\\"/><meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1, shrink-to-fit=no\\"/><meta name=\\"generator\\" content=\\"Gatsby 2.0.0\\"/></head><body><div>div3</div><div>div2</div><div>div1</div><noscript id=\\"gatsby-noscript\\">This app works best with JavaScript enabled.</noscript><div id=\\"___gatsby\\"><div style=\\"outline:none\\" tabindex=\\"-1\\" role=\\"group\\"></div></div><script id=\\"gatsby-script-loader\\">/*<![CDATA[*/window.page={\\"path\\":\\"/about/\\",\\"componentChunkName\\":\\"page-component---src-pages-test-js\\",\\"jsonName\\":\\"about.json\\"};/*]]>*/</script><script id=\\"gatsby-chunk-mapping\\">/*<![CDATA[*/window.___chunkMapping={};/*]]>*/</script></body></html>"`;
52 changes: 24 additions & 28 deletions .cache/__tests__/minimal-config.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,32 @@
const path = require(`path`)
const child = require(`child_process`)

it(
`Builds cache-dir with minimal config`,
done => {
const args = [
require.resolve(`@babel/cli/bin/babel.js`),
path.join(__dirname, `..`),
`--config-file`,
path.join(__dirname, `.babelrc`),
`--ignore`,
`**/__tests__`,
]
it(`Builds cache-dir with minimal config`, done => {
const args = [
require.resolve(`@babel/cli/bin/babel.js`),
path.join(__dirname, `..`),
`--config-file`,
path.join(__dirname, `.babelrc`),
`--ignore`,
`**/__tests__`,
]

const spawn = child.spawn(process.execPath, args)
const spawn = child.spawn(process.execPath, args)

let stderr = ``
let stdout = ``
let stderr = ``
let stdout = ``

spawn.stderr.on(`data`, function(chunk) {
stderr += chunk
})
spawn.stderr.on(`data`, function(chunk) {
stderr += chunk
})

spawn.stdout.on(`data`, function(chunk) {
stdout += chunk
})
spawn.stdout.on(`data`, function(chunk) {
stdout += chunk
})

spawn.on(`close`, function() {
expect(stderr).toEqual(``)
expect(stdout).not.toEqual(``)
done()
})
},
30000
)
spawn.on(`close`, function() {
expect(stderr).toEqual(``)
expect(stdout).not.toEqual(``)
done()
})
}, 30000)
5 changes: 1 addition & 4 deletions .cache/api-runner-browser-plugins.js
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
module.exports = [{
plugin: require('/Users/derek/portfolio/gatsby-browser.js'),
options: {"plugins":[]},
}]
module.exports = []
2 changes: 1 addition & 1 deletion .cache/api-runner-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const {

exports.apiRunner = (api, args = {}, defaultReturn, argTransform) => {
// Hooks for cypress-gatsby's API handler
if (window.Cypress) {
if (process.env.CYPRESS_SUPPORT) {
if (window.___apiHandler) {
window.___apiHandler(api)
} else if (window.___resolvedAPIs) {
Expand Down
2 changes: 1 addition & 1 deletion .cache/api-runner-ssr.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var plugins = [{
options: {"plugins":[]},
},{
plugin: require('/Users/derek/portfolio/node_modules/gatsby-plugin-manifest/gatsby-ssr'),
options: {"plugins":[],"name":"gatsby-starter-default","short_name":"starter","start_url":"/","background_color":"#3fbdff","theme_color":"#3fbdff","display":"minimal-ui","icon":"src/images/gatsby-icon.png"},
options: {"plugins":[],"name":"gatsby-starter-default","short_name":"starter","start_url":"/","background_color":"#3fbdff","theme_color":"#3fbdff","display":"minimal-ui"},
}]
// During bootstrap, we write requires at top of this file which looks like:
// var plugins = [
Expand Down
4 changes: 2 additions & 2 deletions .cache/api-ssr-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ exports.replaceRenderer = true
* is merged with other body props and passed to `html.js` as `bodyProps`.
* @param {Object} pluginOptions
* @example
* const Helmet = require("react-helmet")
* const { Helmet } = require("react-helmet")
*
* exports.onRenderBody = (
* { setHeadComponents, setHtmlAttributes, setBodyAttributes },
Expand Down Expand Up @@ -145,7 +145,7 @@ exports.onPreRenderHTML = true
* @param {string} $0.pathname Path of page.
* @example
* import React from "react"
* import Layout from "./src/components/Layout"
* import Layout from "./src/components/layout"
*
* export const wrapPageElement = ({ element, props }) => {
* // props provide same data to Layout as Page element will get
Expand Down
3 changes: 2 additions & 1 deletion .cache/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import domReady from "domready"
import socketIo from "./socketIo"
import emitter from "./emitter"
import { apiRunner, apiRunnerAsync } from "./api-runner-browser"
import loader, { setApiRunnerForLoader } from "./loader"
import loader, { setApiRunnerForLoader, postInitialRenderWork } from "./loader"
import syncRequires from "./sync-requires"
import pages from "./pages.json"

Expand Down Expand Up @@ -54,6 +54,7 @@ apiRunnerAsync(`onClientEntry`).then(() => {
let Root = preferDefault(require(`./root`))
domReady(() => {
renderer(<Root />, rootElement, () => {
postInitialRenderWork()
apiRunner(`onInitialClientRender`)
})
})
Expand Down
6 changes: 2 additions & 4 deletions .cache/async-requires.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
const preferDefault = m => m && m.default || m

exports.components = {
"component---src-pages-404-js": () => import("/Users/derek/portfolio/src/pages/404.js" /* webpackChunkName: "component---src-pages-404-js" */),
"component---cache-dev-404-page-js": () => import("/Users/derek/portfolio/.cache/dev-404-page.js" /* webpackChunkName: "component---cache-dev-404-page-js" */),
"component---src-pages-about-js": () => import("/Users/derek/portfolio/src/pages/about.js" /* webpackChunkName: "component---src-pages-about-js" */),
"component---src-pages-app-js": () => import("/Users/derek/portfolio/src/pages/App.js" /* webpackChunkName: "component---src-pages-app-js" */),
"component---src-pages-blog-js": () => import("/Users/derek/portfolio/src/pages/blog.js" /* webpackChunkName: "component---src-pages-blog-js" */),
"component---src-pages-index-js": () => import("/Users/derek/portfolio/src/pages/index.js" /* webpackChunkName: "component---src-pages-index-js" */),
"component---src-pages-page-2-js": () => import("/Users/derek/portfolio/src/pages/page-2.js" /* webpackChunkName: "component---src-pages-page-2-js" */),
"component---src-pages-skills-js": () => import("/Users/derek/portfolio/src/pages/skills.js" /* webpackChunkName: "component---src-pages-skills-js" */)
}

exports.data = () => import("/Users/derek/portfolio/.cache/data.json")
exports.data = () => import(/* webpackChunkName: "pages-manifest" */ "/Users/derek/portfolio/.cache/data.json")

This file was deleted.

2 changes: 1 addition & 1 deletion .cache/commonjs/api-runner-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const _require$publicLoader = require(`./loader`).publicLoader,

exports.apiRunner = (api, args = {}, defaultReturn, argTransform) => {
// Hooks for cypress-gatsby's API handler
if (window.Cypress) {
if (process.env.CYPRESS_SUPPORT) {
if (window.___apiHandler) {
window.___apiHandler(api);
} else if (window.___resolvedAPIs) {
Expand Down
4 changes: 2 additions & 2 deletions .cache/commonjs/api-ssr-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ exports.replaceRenderer = true;
* is merged with other body props and passed to `html.js` as `bodyProps`.
* @param {Object} pluginOptions
* @example
* const Helmet = require("react-helmet")
* const { Helmet } = require("react-helmet")
*
* exports.onRenderBody = (
* { setHeadComponents, setHtmlAttributes, setBodyAttributes },
Expand Down Expand Up @@ -146,7 +146,7 @@ exports.onPreRenderHTML = true;
* @param {string} $0.pathname Path of page.
* @example
* import React from "react"
* import Layout from "./src/components/Layout"
* import Layout from "./src/components/layout"
*
* export const wrapPageElement = ({ element, props }) => {
* // props provide same data to Layout as Page element will get
Expand Down
1 change: 1 addition & 0 deletions .cache/commonjs/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ window.___emitter = _emitter.default;
let Root = preferDefault(require(`./root`));
(0, _domready.default)(() => {
renderer(_react.default.createElement(Root, null), rootElement, () => {
(0, _loader.postInitialRenderWork)();
(0, _apiRunnerBrowser.apiRunner)(`onInitialClientRender`);
});
});
Expand Down
41 changes: 20 additions & 21 deletions .cache/commonjs/default-html.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,33 @@
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

exports.__esModule = true;
exports.default = void 0;
exports.default = HTML;

var _react = _interopRequireDefault(require("react"));

var _propTypes = _interopRequireDefault(require("prop-types"));

class HTML extends _react.default.Component {
render() {
return _react.default.createElement("html", this.props.htmlAttributes, _react.default.createElement("head", null, _react.default.createElement("meta", {
charSet: "utf-8"
}), _react.default.createElement("meta", {
httpEquiv: "x-ua-compatible",
content: "ie=edge"
}), _react.default.createElement("meta", {
name: "viewport",
content: "width=device-width, initial-scale=1, shrink-to-fit=no"
}), this.props.headComponents), _react.default.createElement("body", this.props.bodyAttributes, this.props.preBodyComponents, _react.default.createElement("div", {
key: `body`,
id: "___gatsby",
dangerouslySetInnerHTML: {
__html: this.props.body
}
}), this.props.postBodyComponents));
}

function HTML(props) {
return _react.default.createElement("html", props.htmlAttributes, _react.default.createElement("head", null, _react.default.createElement("meta", {
charSet: "utf-8"
}), _react.default.createElement("meta", {
httpEquiv: "x-ua-compatible",
content: "ie=edge"
}), _react.default.createElement("meta", {
name: "viewport",
content: "width=device-width, initial-scale=1, shrink-to-fit=no"
}), props.headComponents), _react.default.createElement("body", props.bodyAttributes, props.preBodyComponents, _react.default.createElement("noscript", {
key: "noscript",
id: "gatsby-noscript"
}, "This app works best with JavaScript enabled."), _react.default.createElement("div", {
key: `body`,
id: "___gatsby",
dangerouslySetInnerHTML: {
__html: props.body
}
}), props.postBodyComponents));
}

exports.default = HTML;
HTML.propTypes = {
htmlAttributes: _propTypes.default.object,
headComponents: _propTypes.default.array,
Expand Down
3 changes: 2 additions & 1 deletion .cache/commonjs/ensure-resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ class EnsureResources extends _react.default.Component {

render() {
if (!this.hasResources(this.state.pageResources) && isInitialRender) {
// prevent hydrating
window.___failedResources = true; // prevent hydrating

throw new Error(`Missing resources for ${this.state.location.pathname}`);
}

Expand Down
Loading

0 comments on commit 9bf1fa2

Please sign in to comment.