Skip to content

Commit

Permalink
Changed theme to gatsby starter mate
Browse files Browse the repository at this point in the history
  • Loading branch information
gohilmukund committed Oct 17, 2021
1 parent 6f88578 commit aaf2b5f
Show file tree
Hide file tree
Showing 493 changed files with 133,772 additions and 50,155 deletions.
15 changes: 3 additions & 12 deletions .cache/api-runner-browser-plugins.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
module.exports = [{
plugin: require('../node_modules/gatsby-plugin-typography/gatsby-browser.js'),
options: {"plugins":[],"pathToConfigModule":"C:\\Project\\Github\\Mukund-Fun-Website\\node_modules\\@christiandavid\\gatsby-theme-byfolio/src/utils/typography"},
},{
plugin: require('../node_modules/gatsby-plugin-manifest/gatsby-browser.js'),
options: {"plugins":[],"name":"Mukund's Portfolio","short_name":"MK","description":"This cool App contains information about my work experience and my journey.","lang":"en","start_url":"/","background_color":"#000","theme_color":"#fff","display":"standalone","icon":"src/images/icon.png","legacy":true,"theme_color_in_head":true,"cache_busting_mode":"query","crossOrigin":"anonymous","include_favicon":true,"cacheDigest":"35e7419a9581a42600d1d4d990c07e3c"},
},{
plugin: require('../node_modules/gatsby-plugin-transition-link/gatsby-browser.js'),
options: {"plugins":[],"layout":"C:\\Project\\Github\\Mukund-Fun-Website\\node_modules\\@christiandavid\\gatsby-theme-byfolio\\src\\layout\\index.js"},
},{
plugin: require('../node_modules/gatsby-plugin-offline/gatsby-browser.js'),
options: {"plugins":[]},
options: {"plugins":[],"name":"Mate Portfolio","short_name":"Mate","start_url":"/","background_color":"#FFFFFF","theme_color":"#7c37ad","display":"minimal-ui","icon":"icon.png","legacy":true,"theme_color_in_head":true,"cache_busting_mode":"query","crossOrigin":"anonymous","include_favicon":true,"cacheDigest":"bd811806cc1b8afc275a716b064f3106"},
},{
plugin: require('../node_modules/gatsby-plugin-nprogress/gatsby-browser.js'),
options: {"plugins":[],"showSpinner":false},
plugin: require('../node_modules/gatsby-theme-mate/gatsby-browser.js'),
options: {"plugins":[],"accessToken":"ym_MYTGHNxBgH7ZENgkQ6158vaDkZ9sBVaPB0I8IXRc","spaceId":"lvsph0h3pwj7"},
}]
13 changes: 2 additions & 11 deletions .cache/api-runner-browser.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
const plugins = require(`./api-runner-browser-plugins`)
const {
getResourcesForPathname,
getResourcesForPathnameSync,
getResourceURLsForPathname,
loadPage,
loadPageSync,
} = require(`./loader`).publicLoader
const { getResourceURLsForPathname, loadPage, loadPageSync } =
require(`./loader`).publicLoader

exports.apiRunner = (api, args = {}, defaultReturn, argTransform) => {
// Hooks for gatsby-cypress's API handler
Expand All @@ -24,10 +19,6 @@ exports.apiRunner = (api, args = {}, defaultReturn, argTransform) => {
return undefined
}

// Deprecated April 2019. Use `loadPageSync` instead
args.getResourcesForPathnameSync = getResourcesForPathnameSync
// Deprecated April 2019. Use `loadPage` instead
args.getResourcesForPathname = getResourcesForPathname
args.getResourceURLsForPathname = getResourceURLsForPathname
args.loadPage = loadPage
args.loadPageSync = loadPageSync
Expand Down
102 changes: 71 additions & 31 deletions .cache/api-runner-ssr.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
var plugins = [{
plugin: require('C:/Project/Github/Mukund-Fun-Website/node_modules/gatsby-plugin-typography/gatsby-ssr'),
options: {"plugins":[],"pathToConfigModule":"C:\\Project\\Github\\Mukund-Fun-Website\\node_modules\\@christiandavid\\gatsby-theme-byfolio/src/utils/typography"},
},{
plugin: require('C:/Project/Github/Mukund-Fun-Website/node_modules/gatsby-plugin-manifest/gatsby-ssr'),
options: {"plugins":[],"name":"Mukund's Portfolio","short_name":"MK","description":"This cool App contains information about my work experience and my journey.","lang":"en","start_url":"/","background_color":"#000","theme_color":"#fff","display":"standalone","icon":"src/images/icon.png","legacy":true,"theme_color_in_head":true,"cache_busting_mode":"query","crossOrigin":"anonymous","include_favicon":true,"cacheDigest":"35e7419a9581a42600d1d4d990c07e3c"},
},{
plugin: require('C:/Project/Github/Mukund-Fun-Website/node_modules/gatsby-plugin-transition-link/gatsby-ssr'),
options: {"plugins":[],"layout":"C:\\Project\\Github\\Mukund-Fun-Website\\node_modules\\@christiandavid\\gatsby-theme-byfolio\\src\\layout\\index.js"},
},{
plugin: require('C:/Project/Github/Mukund-Fun-Website/node_modules/gatsby-plugin-offline/gatsby-ssr'),
options: {"plugins":[]},
},{
name: 'gatsby-plugin-react-helmet',
plugin: require('C:/Project/Github/Mukund-Fun-Website/node_modules/gatsby-plugin-react-helmet/gatsby-ssr'),
options: {"plugins":[]},
},{
plugin: require('C:/Project/Github/Mukund-Fun-Website/node_modules/gatsby-plugin-sitemap/gatsby-ssr'),
options: {"plugins":[],"exclude":["/experience/_additionalSkills"],"output":"/sitemap.xml","createLinkInHead":true},
name: 'gatsby-plugin-styled-components',
plugin: require('C:/Project/Github/Mukund-Fun-Website/node_modules/gatsby-plugin-styled-components/gatsby-ssr'),
options: {"plugins":[],"displayName":true,"fileName":true,"minify":true,"namespace":"","transpileTemplateLiterals":true,"topLevelImportPaths":[],"pure":false},
},{
name: 'gatsby-plugin-manifest',
plugin: require('C:/Project/Github/Mukund-Fun-Website/node_modules/gatsby-plugin-manifest/gatsby-ssr'),
options: {"plugins":[],"name":"Mate Portfolio","short_name":"Mate","start_url":"/","background_color":"#FFFFFF","theme_color":"#7c37ad","display":"minimal-ui","icon":"icon.png","legacy":true,"theme_color_in_head":true,"cache_busting_mode":"query","crossOrigin":"anonymous","include_favicon":true,"cacheDigest":"bd811806cc1b8afc275a716b064f3106"},
}]
/* global plugins */
// During bootstrap, we write requires at top of this file which looks like:
// var plugins = [
// {
Expand All @@ -31,31 +26,76 @@ var plugins = [{

const apis = require(`./api-ssr-docs`)

// Run the specified API in any plugins that have implemented it
module.exports = (api, args, defaultReturn, argTransform) => {
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)
}

// Run each plugin in series.
// eslint-disable-next-line no-undef
let results = plugins.map(plugin => {
if (!plugin.plugin[api]) {
return undefined
const results = []
plugins.forEach(plugin => {
const apiFn = plugin.plugin[api]
if (!apiFn) {
return
}
const result = plugin.plugin[api](args, plugin.options)
if (result && argTransform) {
args = argTransform({ args, result })

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 result
})

// Filter out undefined results.
results = results.filter(result => typeof result !== `undefined`)
return results.length ? results : [defaultReturn]
}

if (results.length > 0) {
return results
} else {
return [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]
}
134 changes: 102 additions & 32 deletions .cache/app.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from "react"
import ReactDOM from "react-dom"
import domReady from "@mikaelkristiansson/domready"
import io from "socket.io-client"

import socketIo from "./socketIo"
Expand All @@ -9,20 +8,32 @@ import { apiRunner, apiRunnerAsync } from "./api-runner-browser"
import { setLoader, publicLoader } from "./loader"
import { Indicator } from "./loading-indicator/indicator"
import DevLoader from "./dev-loader"
import syncRequires from "$virtual/sync-requires"
import asyncRequires from "$virtual/async-requires"
// Generated during bootstrap
import matchPaths from "$virtual/match-paths.json"
import { LoadingIndicatorEventHandler } from "./loading-indicator"
import Root from "./root"
import { init as navigationInit } from "./navigation"
// ensure in develop we have at least some .css (even if it's empty).
// this is so there is no warning about not matching content-type when site doesn't include any regular css (for example when css-in-js is used)
// this also make sure that if all css is removed in develop we are not left with stale commons.css that have stale content
import "./blank.css"

if (process.env.GATSBY_HOT_LOADER === `fast-refresh` && module.hot) {
module.hot.accept(`$virtual/sync-requires`, () => {
// Manually reload
})
}
// Enable fast-refresh for virtual sync-requires, gatsby-browser & navigation
// To ensure that our <Root /> component can hot reload in case anything below doesn't
// satisfy fast-refresh constraints
module.hot.accept(
[`$virtual/async-requires`, `./api-runner-browser`, `./navigation`],
() => {
// asyncRequires should be automatically updated here (due to ESM import and webpack HMR spec),
// but loader doesn't know that and needs to be manually nudged
loader.updateAsyncRequires(asyncRequires)
}
)

window.___emitter = emitter

const loader = new DevLoader(syncRequires, matchPaths)
const loader = new DevLoader(asyncRequires, matchPaths)
setLoader(loader)
loader.setApiRunner(apiRunner)

Expand Down Expand Up @@ -118,12 +129,22 @@ apiRunnerAsync(`onClientEntry`).then(() => {
const rootElement = document.getElementById(`___gatsby`)

const focusEl = document.getElementById(`gatsby-focus-wrapper`)

// Client only pages have any empty body so we just do a normal
// render to avoid React complaining about hydration mis-matches.
let defaultRenderer = ReactDOM.render
if (focusEl && focusEl.children.length) {
if (ReactDOM.hydrateRoot) {
defaultRenderer = ReactDOM.hydrateRoot
} else {
defaultRenderer = ReactDOM.hydrate
}
}

const renderer = apiRunner(
`replaceHydrateFunction`,
undefined,
// Client only pages have any empty body so we just do a normal
// render to avoid React complaining about hydration mis-matches.
focusEl && focusEl.children.length > 0 ? ReactDOM.hydrate : ReactDOM.render
defaultRenderer
)[0]

let dismissLoadingIndicator
Expand Down Expand Up @@ -155,33 +176,82 @@ apiRunnerAsync(`onClientEntry`).then(() => {
loader.loadPage(`/404.html`),
loader.loadPage(window.location.pathname),
]).then(() => {
const preferDefault = m => (m && m.default) || m
const Root = preferDefault(require(`./root`))
domReady(() => {
if (dismissLoadingIndicator) {
dismissLoadingIndicator()
}
navigationInit()

function onHydrated() {
apiRunner(`onInitialClientRender`)

// Render query on demand overlay
if (
process.env.GATSBY_QUERY_ON_DEMAND_LOADING_INDICATOR &&
process.env.GATSBY_QUERY_ON_DEMAND_LOADING_INDICATOR === `true`
) {
const indicatorMountElement = document.createElement(`div`)
indicatorMountElement.setAttribute(
`id`,
`query-on-demand-indicator-element`
)
document.body.append(indicatorMountElement)

renderer(<Root />, rootElement, () => {
apiRunner(`onInitialClientRender`)

// Render query on demand overlay
if (
process.env.GATSBY_QUERY_ON_DEMAND_LOADING_INDICATOR &&
process.env.GATSBY_QUERY_ON_DEMAND_LOADING_INDICATOR === `true`
) {
const indicatorMountElement = document.createElement(`div`)
indicatorMountElement.setAttribute(
`id`,
`query-on-demand-indicator-element`
if (renderer === ReactDOM.hydrateRoot) {
ReactDOM.createRoot(indicatorMountElement).render(
<LoadingIndicatorEventHandler />
)
document.body.append(indicatorMountElement)
} else {
ReactDOM.render(
<LoadingIndicatorEventHandler />,
indicatorMountElement
)
}
})
})
}
}

function App() {
const onClientEntryRanRef = React.useRef(false)

React.useEffect(() => {
if (!onClientEntryRanRef.current) {
onClientEntryRanRef.current = true

onHydrated()
}
}, [])

return <Root />
}

function runRender() {
if (dismissLoadingIndicator) {
dismissLoadingIndicator()
}

if (renderer === ReactDOM.hydrateRoot) {
renderer(rootElement, <App />)
} else {
renderer(<App />, rootElement)
}
}

// https://github.com/madrobby/zepto/blob/b5ed8d607f67724788ec9ff492be297f64d47dfc/src/zepto.js#L439-L450
// TODO remove IE 10 support
const doc = document
if (
doc.readyState === `complete` ||
(doc.readyState !== `loading` && !doc.documentElement.doScroll)
) {
setTimeout(function () {
runRender()
}, 0)
} else {
const handler = function () {
doc.removeEventListener(`DOMContentLoaded`, handler, false)
window.removeEventListener(`load`, handler, false)

runRender()
}

doc.addEventListener(`DOMContentLoaded`, handler, false)
window.addEventListener(`load`, handler, false)
}
})
})
9 changes: 2 additions & 7 deletions .cache/async-requires.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@ 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---node-modules-christiandavid-gatsby-theme-byfolio-src-pages-404-js": () => import("./../../../node_modules/@christiandavid/gatsby-theme-byfolio/src/pages/404.js" /* webpackChunkName: "component---node-modules-christiandavid-gatsby-theme-byfolio-src-pages-404-js" */),
"component---node-modules-christiandavid-gatsby-theme-byfolio-src-templates-job-js": () => import("./../../../node_modules/@christiandavid/gatsby-theme-byfolio/src/templates/job.js" /* webpackChunkName: "component---node-modules-christiandavid-gatsby-theme-byfolio-src-templates-job-js" */),
"component---src-pages-404-js": () => import("./../../../src/pages/404.js" /* webpackChunkName: "component---src-pages-404-js" */),
"component---src-pages-about-me-js": () => import("./../../../src/pages/about-me.js" /* webpackChunkName: "component---src-pages-about-me-js" */),
"component---src-pages-experience-js": () => import("./../../../src/pages/experience.js" /* webpackChunkName: "component---src-pages-experience-js" */),
"component---src-pages-index-js": () => import("./../../../src/pages/index.js" /* webpackChunkName: "component---src-pages-index-js" */),
"component---src-pages-skills-js": () => import("./../../../src/pages/skills.js" /* webpackChunkName: "component---src-pages-skills-js" */)
"component---node-modules-gatsby-theme-mate-src-templates-home-tsx": () => import("./../../../node_modules/gatsby-theme-mate/src/templates/Home.tsx" /* webpackChunkName: "component---node-modules-gatsby-theme-mate-src-templates-home-tsx" */),
"component---node-modules-gatsby-theme-mate-src-templates-not-found-tsx": () => import("./../../../node_modules/gatsby-theme-mate/src/templates/NotFound.tsx" /* webpackChunkName: "component---node-modules-gatsby-theme-mate-src-templates-not-found-tsx" */)
}

Loading

0 comments on commit aaf2b5f

Please sign in to comment.