diff --git a/www/reference/.cache/.eslintrc.json b/www/reference/.cache/.eslintrc.json deleted file mode 100644 index 7396d0ec0c..0000000000 --- a/www/reference/.cache/.eslintrc.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "env": { - "browser": true - }, - "globals": { - "__PATH_PREFIX__": false, - "___emitter": false - } -} diff --git a/www/reference/.cache/_this_is_virtual_fs_path_/$virtual/async-requires.js b/www/reference/.cache/_this_is_virtual_fs_path_/$virtual/async-requires.js deleted file mode 100644 index c0e552177e..0000000000 --- a/www/reference/.cache/_this_is_virtual_fs_path_/$virtual/async-requires.js +++ /dev/null @@ -1,8 +0,0 @@ -// prefer default export if available -const preferDefault = m => (m && m.default) || m - -exports.components = { - "component---cache-dev-404-page-js": () => import("./../../dev-404-page.js" /* webpackChunkName: "component---cache-dev-404-page-js" */), - "component---src-templates-reference-page-js": () => import("./../../../src/templates/reference-page.js" /* webpackChunkName: "component---src-templates-reference-page-js" */) -} - diff --git a/www/reference/.cache/_this_is_virtual_fs_path_/$virtual/loading-indicator.js b/www/reference/.cache/_this_is_virtual_fs_path_/$virtual/loading-indicator.js deleted file mode 100644 index 4e10d23a97..0000000000 --- a/www/reference/.cache/_this_is_virtual_fs_path_/$virtual/loading-indicator.js +++ /dev/null @@ -1,6 +0,0 @@ - - export function isLoadingIndicatorEnabled() { - return `Cypress` in window - ? false - : true - } \ No newline at end of file diff --git a/www/reference/.cache/_this_is_virtual_fs_path_/$virtual/match-paths.json b/www/reference/.cache/_this_is_virtual_fs_path_/$virtual/match-paths.json deleted file mode 100644 index 0637a088a0..0000000000 --- a/www/reference/.cache/_this_is_virtual_fs_path_/$virtual/match-paths.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/www/reference/.cache/_this_is_virtual_fs_path_/$virtual/ssr-sync-requires b/www/reference/.cache/_this_is_virtual_fs_path_/$virtual/ssr-sync-requires deleted file mode 100644 index fea9261c12..0000000000 --- a/www/reference/.cache/_this_is_virtual_fs_path_/$virtual/ssr-sync-requires +++ /dev/null @@ -1,10 +0,0 @@ - - // prefer default export if available - const preferDefault = m => (m && m.default) || m - - -exports.ssrComponents = { - "component---cache-dev-404-page-js": preferDefault(require("/Users/oliverjuhl/Desktop/medusa/core/www/reference/.cache/dev-404-page.js")), - "component---src-templates-reference-page-js": preferDefault(require("/Users/oliverjuhl/Desktop/medusa/core/www/reference/src/templates/reference-page.js")) - } - diff --git a/www/reference/.cache/_this_is_virtual_fs_path_/$virtual/sync-requires.js b/www/reference/.cache/_this_is_virtual_fs_path_/$virtual/sync-requires.js deleted file mode 100644 index af1eeaa156..0000000000 --- a/www/reference/.cache/_this_is_virtual_fs_path_/$virtual/sync-requires.js +++ /dev/null @@ -1,10 +0,0 @@ - -// prefer default export if available -const preferDefault = m => (m && m.default) || m - - -exports.components = { - "component---cache-dev-404-page-js": preferDefault(require("/Users/oliverjuhl/Desktop/medusa/core/www/reference/.cache/dev-404-page.js")), - "component---src-templates-reference-page-js": preferDefault(require("/Users/oliverjuhl/Desktop/medusa/core/www/reference/src/templates/reference-page.js")) -} - diff --git a/www/reference/.cache/api-runner-browser-plugins.js b/www/reference/.cache/api-runner-browser-plugins.js deleted file mode 100644 index 679d65f3c8..0000000000 --- a/www/reference/.cache/api-runner-browser-plugins.js +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = [{ - plugin: require('../node_modules/gatsby-plugin-anchor-links/gatsby-browser.js'), - options: {"plugins":[],"offset":-100,"duration":1000}, - },{ - plugin: require('../node_modules/gatsby-remark-autolink-headers/gatsby-browser.js'), - options: {"plugins":[],"elements":["h2","h3","h4"],"offsetY":0,"className":"anchor"}, - },{ - plugin: require('../node_modules/gatsby-plugin-theme-ui/gatsby-browser.js'), - options: {"plugins":[]}, - },{ - plugin: require('../gatsby-browser.js'), - options: {"plugins":[]}, - }] diff --git a/www/reference/.cache/api-runner-browser.js b/www/reference/.cache/api-runner-browser.js deleted file mode 100644 index c65337c9a3..0000000000 --- a/www/reference/.cache/api-runner-browser.js +++ /dev/null @@ -1,52 +0,0 @@ -const plugins = require(`./api-runner-browser-plugins`) -const { getResourceURLsForPathname, loadPage, loadPageSync } = - require(`./loader`).publicLoader - -exports.apiRunner = (api, args = {}, defaultReturn, argTransform) => { - // Hooks for gatsby-cypress's API handler - if (process.env.CYPRESS_SUPPORT) { - if (window.___apiHandler) { - window.___apiHandler(api) - } else if (window.___resolvedAPIs) { - window.___resolvedAPIs.push(api) - } else { - window.___resolvedAPIs = [api] - } - } - - let results = plugins.map(plugin => { - if (!plugin.plugin[api]) { - return undefined - } - - args.getResourceURLsForPathname = getResourceURLsForPathname - args.loadPage = loadPage - args.loadPageSync = loadPageSync - - const result = plugin.plugin[api](args, plugin.options) - if (result && argTransform) { - args = argTransform({ args, result, plugin }) - } - return result - }) - - // Filter out undefined results. - results = results.filter(result => typeof result !== `undefined`) - - if (results.length > 0) { - return results - } else if (defaultReturn) { - return [defaultReturn] - } else { - return [] - } -} - -exports.apiRunnerAsync = (api, args, defaultReturn) => - plugins.reduce( - (previous, next) => - next.plugin[api] - ? previous.then(() => next.plugin[api](args, next.options)) - : previous, - Promise.resolve() - ) diff --git a/www/reference/.cache/api-runner-ssr.js b/www/reference/.cache/api-runner-ssr.js deleted file mode 100644 index 5a6f60fff8..0000000000 --- a/www/reference/.cache/api-runner-ssr.js +++ /dev/null @@ -1,105 +0,0 @@ -var plugins = [{ - name: 'gatsby-plugin-react-helmet', - plugin: require('/Users/oliverjuhl/Desktop/medusa/core/www/reference/node_modules/gatsby-plugin-react-helmet/gatsby-ssr'), - options: {"plugins":[]}, - },{ - name: 'gatsby-remark-autolink-headers', - plugin: require('/Users/oliverjuhl/Desktop/medusa/core/www/reference/node_modules/gatsby-remark-autolink-headers/gatsby-ssr'), - options: {"plugins":[],"elements":["h2","h3","h4"],"offsetY":0,"className":"anchor"}, - },{ - name: 'gatsby-plugin-theme-ui', - plugin: require('/Users/oliverjuhl/Desktop/medusa/core/www/reference/node_modules/gatsby-plugin-theme-ui/gatsby-ssr'), - options: {"plugins":[]}, - },{ - name: 'default-site-plugin', - plugin: require('/Users/oliverjuhl/Desktop/medusa/core/www/reference/gatsby-ssr'), - options: {"plugins":[]}, - }] -/* global plugins */ -// During bootstrap, we write requires at top of this file which looks like: -// var plugins = [ -// { -// plugin: require("/path/to/plugin1/gatsby-ssr.js"), -// options: { ... }, -// }, -// { -// plugin: require("/path/to/plugin2/gatsby-ssr.js"), -// options: { ... }, -// }, -// ] - -const apis = require(`./api-ssr-docs`) - -function augmentErrorWithPlugin(plugin, err) { - if (plugin.name !== `default-site-plugin`) { - // default-site-plugin is user code and will print proper stack trace, - // so no point in annotating error message pointing out which plugin is root of the problem - err.message += ` (from plugin: ${plugin.name})` - } - - throw err -} - -export function apiRunner(api, args, defaultReturn, argTransform) { - if (!apis[api]) { - console.log(`This API doesn't exist`, api) - } - - const results = [] - plugins.forEach(plugin => { - const apiFn = plugin.plugin[api] - if (!apiFn) { - return - } - - try { - const result = apiFn(args, plugin.options) - - if (result && argTransform) { - args = argTransform({ args, result }) - } - - // This if case keeps behaviour as before, we should allow undefined here as the api is defined - // TODO V4 - if (typeof result !== `undefined`) { - results.push(result) - } - } catch (e) { - augmentErrorWithPlugin(plugin, e) - } - }) - - return results.length ? results : [defaultReturn] -} - -export async function apiRunnerAsync(api, args, defaultReturn, argTransform) { - if (!apis[api]) { - console.log(`This API doesn't exist`, api) - } - - const results = [] - for (const plugin of plugins) { - const apiFn = plugin.plugin[api] - if (!apiFn) { - continue - } - - try { - const result = await apiFn(args, plugin.options) - - if (result && argTransform) { - args = argTransform({ args, result }) - } - - // This if case keeps behaviour as before, we should allow undefined here as the api is defined - // TODO V4 - if (typeof result !== `undefined`) { - results.push(result) - } - } catch (e) { - augmentErrorWithPlugin(plugin, e) - } - } - - return results.length ? results : [defaultReturn] -} diff --git a/www/reference/.cache/api-ssr-docs.js b/www/reference/.cache/api-ssr-docs.js deleted file mode 100644 index 2fead5cdf1..0000000000 --- a/www/reference/.cache/api-ssr-docs.js +++ /dev/null @@ -1,205 +0,0 @@ -/** - * Object containing options defined in `gatsby-config.js` - * @typedef {object} pluginOptions - */ - -/** - * Replace the default server renderer. This is useful for integration with - * Redux, css-in-js libraries, etc. that need custom setups for server - * rendering. - * @param {object} $0 - * @param {string} $0.pathname The pathname of the page currently being rendered. - * @param {ReactNode} $0.bodyComponent The React element to be rendered as the page body - * @param {function} $0.replaceBodyHTMLString Call this with the HTML string - * you render. **WARNING** if multiple plugins implement this API it's the - * last plugin that "wins". TODO implement an automated warning against this. - * @param {function} $0.setHeadComponents Takes an array of components as its - * first argument which are added to the `headComponents` array which is passed - * to the `html.js` component. - * @param {function} $0.setHtmlAttributes Takes an object of props which will - * spread into the `` component. - * @param {function} $0.setBodyAttributes Takes an object of props which will - * spread into the `` component. - * @param {function} $0.setPreBodyComponents Takes an array of components as its - * first argument which are added to the `preBodyComponents` array which is passed - * to the `html.js` component. - * @param {function} $0.setPostBodyComponents Takes an array of components as its - * first argument which are added to the `postBodyComponents` array which is passed - * to the `html.js` component. - * @param {function} $0.setBodyProps Takes an object of data which - * is merged with other body props and passed to `html.js` as `bodyProps`. - * @param {pluginOptions} pluginOptions - * @example - * // From gatsby-plugin-glamor - * const { renderToString } = require("react-dom/server") - * const inline = require("glamor-inline") - * - * exports.replaceRenderer = ({ bodyComponent, replaceBodyHTMLString }) => { - * const bodyHTML = renderToString(bodyComponent) - * const inlinedHTML = inline(bodyHTML) - * - * replaceBodyHTMLString(inlinedHTML) - * } - */ -exports.replaceRenderer = true - -/** - * Called after every page Gatsby server renders while building HTML so you can - * set head and body components to be rendered in your `html.js`. - * - * Gatsby does a two-pass render for HTML. It loops through your pages first - * rendering only the body and then takes the result body HTML string and - * passes it as the `body` prop to your `html.js` to complete the render. - * - * It's often handy to be able to send custom components to your `html.js`. - * For example, it's a very common pattern for React.js libraries that - * support server rendering to pull out data generated during the render to - * add to your HTML. - * - * Using this API over [`replaceRenderer`](#replaceRenderer) is preferable as - * multiple plugins can implement this API where only one plugin can take - * over server rendering. However, if your plugin requires taking over server - * rendering then that's the one to - * use - * @param {object} $0 - * @param {string} $0.pathname The pathname of the page currently being rendered. - * @param {function} $0.setHeadComponents Takes an array of components as its - * first argument which are added to the `headComponents` array which is passed - * to the `html.js` component. - * @param {function} $0.setHtmlAttributes Takes an object of props which will - * spread into the `` component. - * @param {function} $0.setBodyAttributes Takes an object of props which will - * spread into the `` component. - * @param {function} $0.setPreBodyComponents Takes an array of components as its - * first argument which are added to the `preBodyComponents` array which is passed - * to the `html.js` component. - * @param {function} $0.setPostBodyComponents Takes an array of components as its - * first argument which are added to the `postBodyComponents` array which is passed - * to the `html.js` component. - * @param {function} $0.setBodyProps Takes an object of data which - * is merged with other body props and passed to `html.js` as `bodyProps`. - * @param {pluginOptions} pluginOptions - * @example - * // Import React so that you can use JSX in HeadComponents - * const React = require("react") - * - * const HtmlAttributes = { - * lang: "en" - * } - * - * const HeadComponents = [ - *