From db12bb3e726cb6631f75cfa751ad35ddd5eaf9c3 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Sat, 22 Jun 2019 23:14:37 +0200 Subject: [PATCH] continuation --- .eslintrc.js | 2 +- .gitignore | 3 +- .prettierrc.js | 2 +- README.md | 16 +- .../cypress/support/commands.js | 2 +- .../cypress/support/index.js | 4 +- .../development-runtime/gatsby-config.js | 5 +- e2e-tests/development-runtime/package.json | 5 +- .../gatsby-browser.js | 4 +- .../gatsby-plugin-top-layout/gatsby-ssr.js | 4 +- .../gatsby-plugin-top-layout/top-layout.js | 20 +- .../src/components/link.js | 6 +- .../src/components/pro-tip.js | 10 +- .../development-runtime/src/pages/about.js | 14 +- .../development-runtime/src/pages/index.js | 36 +- .../src/styles-provider-props.js | 8 + e2e-tests/development-runtime/src/theme.js | 4 +- .../src/utils/styles-provider-props.js | 17 - .../cypress/support/commands.js | 2 +- .../cypress/support/index.js | 4 +- e2e-tests/production-runtime/gatsby-config.js | 7 +- e2e-tests/production-runtime/package.json | 3 +- .../gatsby-browser.js | 4 +- .../gatsby-plugin-top-layout/gatsby-ssr.js | 4 +- .../gatsby-plugin-top-layout/top-layout.js | 20 +- .../production-runtime/src/components/link.js | 6 +- .../src/components/pro-tip.js | 10 +- .../production-runtime/src/pages/about.js | 14 +- .../production-runtime/src/pages/index.js | 14 +- .../src/styles-provider-props.js | 8 + e2e-tests/production-runtime/src/theme.js | 4 +- gatsby-plugin-material-ui/.gitignore | 4 +- gatsby-plugin-material-ui/README.md | 87 +- gatsby-plugin-material-ui/package-lock.json | 1186 ----------------- .../src/__tests__/gatsby-browser.test.js | 12 +- .../src/gatsby-browser.js | 22 +- gatsby-plugin-material-ui/src/gatsby-node.js | 80 +- gatsby-plugin-material-ui/src/gatsby-ssr.js | 68 +- yarn.lock | 2 +- 39 files changed, 249 insertions(+), 1474 deletions(-) create mode 100644 e2e-tests/development-runtime/src/styles-provider-props.js delete mode 100644 e2e-tests/development-runtime/src/utils/styles-provider-props.js create mode 100644 e2e-tests/production-runtime/src/styles-provider-props.js delete mode 100644 gatsby-plugin-material-ui/package-lock.json diff --git a/.eslintrc.js b/.eslintrc.js index 8bd9708..568beee 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -15,4 +15,4 @@ module.exports = { }, }, ], -} +}; diff --git a/.gitignore b/.gitignore index 4a181a7..1e07311 100644 --- a/.gitignore +++ b/.gitignore @@ -63,4 +63,5 @@ typings/ # Lib folder lib -.DS_Store \ No newline at end of file +.DS_Store + diff --git a/.prettierrc.js b/.prettierrc.js index 764cbee..ae9d5ac 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -1,6 +1,6 @@ module.exports = { semi: true, - singleQuote: true, + singleQuote: false, tabWidth: 2, trailingComma: "all", }; diff --git a/README.md b/README.md index cd565e5..e09c46f 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,9 @@ # gatsby-plugin-material-ui -> A [Gatsby](https://github.com/gatsbyjs/gatsby) plugin for -> [@material-ui/styles](https://github.com/mui-org/material-ui) with -> built-in server-side rendering support. +> A [Gatsby](https://github.com/gatsbyjs/gatsby) plugin for [@material-ui/styles](https://github.com/mui-org/material-ui) with built-in server-side rendering support. This is the plugin for Material-UI v4. The plugin for v3 can be found [here](https://github.com/hupe1980/gatsby-plugin-material-ui/tree/v1.2.5). -## Install - -`npm install --save gatsby-plugin-material-ui @material-ui/styles` - ## Documentation -[The documentation](/gatsby-plugin-material-ui/README.md) - -## Examples - -You can find an official integration example of this plugin [on Material-UI side](https://github.com/mui-org/material-ui/tree/master/examples/gatsby), then you can pick one of the [Page Layout Examples](https://material-ui.com/getting-started/page-layout-examples/). - -If you want to save time with a more opinionated solution. You can start with [a premade theme](https://github.com/hupe1980/gatsby-theme-material-ui). \ No newline at end of file +[Read the documentation](/gatsby-plugin-material-ui/README.md). diff --git a/e2e-tests/development-runtime/cypress/support/commands.js b/e2e-tests/development-runtime/cypress/support/commands.js index 37e1fbb..0ed057a 100644 --- a/e2e-tests/development-runtime/cypress/support/commands.js +++ b/e2e-tests/development-runtime/cypress/support/commands.js @@ -1,4 +1,4 @@ -import 'cypress-testing-library/add-commands'; +import "cypress-testing-library/add-commands"; Cypress.Commands.add(`lifecycleCallCount`, action => cy diff --git a/e2e-tests/development-runtime/cypress/support/index.js b/e2e-tests/development-runtime/cypress/support/index.js index 9b667ad..3fd5428 100644 --- a/e2e-tests/development-runtime/cypress/support/index.js +++ b/e2e-tests/development-runtime/cypress/support/index.js @@ -1,2 +1,2 @@ -import 'gatsby-cypress'; -import './commands'; +import "gatsby-cypress"; +import "./commands"; diff --git a/e2e-tests/development-runtime/gatsby-config.js b/e2e-tests/development-runtime/gatsby-config.js index 4225cbd..3b46f1f 100644 --- a/e2e-tests/development-runtime/gatsby-config.js +++ b/e2e-tests/development-runtime/gatsby-config.js @@ -3,13 +3,10 @@ module.exports = { `gatsby-plugin-top-layout`, { resolve: `gatsby-plugin-material-ui`, - // If you want to use styled components you should change the injection order. options: { - pathToStylesProvider: `src/utils/styles-provider-props`, + pathToStylesProvider: `src/styles-provider-props`, }, }, - // If you want to use styled components you should add the plugin here. - `gatsby-plugin-styled-components`, `gatsby-plugin-react-helmet`, ], siteMetadata: { diff --git a/e2e-tests/development-runtime/package.json b/e2e-tests/development-runtime/package.json index efd97cc..7573150 100644 --- a/e2e-tests/development-runtime/package.json +++ b/e2e-tests/development-runtime/package.json @@ -6,13 +6,10 @@ "@material-ui/core": "latest", "@material-ui/styles": "latest", "gatsby": "latest", - "gatsby-plugin-material-ui": "^2.0.1", "gatsby-plugin-react-helmet": "latest", - "gatsby-plugin-styled-components": "^3.0.7", "react": "latest", "react-dom": "latest", - "react-helmet": "latest", - "styled-components": "^4.3.1" + "react-helmet": "latest" }, "license": "MIT", "scripts": { diff --git a/e2e-tests/development-runtime/plugins/gatsby-plugin-top-layout/gatsby-browser.js b/e2e-tests/development-runtime/plugins/gatsby-plugin-top-layout/gatsby-browser.js index 457864e..c4df94e 100644 --- a/e2e-tests/development-runtime/plugins/gatsby-plugin-top-layout/gatsby-browser.js +++ b/e2e-tests/development-runtime/plugins/gatsby-plugin-top-layout/gatsby-browser.js @@ -1,5 +1,5 @@ -import React from 'react'; -import TopLayout from './top-layout'; +import React from "react"; +import TopLayout from "./top-layout"; export const wrapRootElement = ({ element }) => { return {element}; diff --git a/e2e-tests/development-runtime/plugins/gatsby-plugin-top-layout/gatsby-ssr.js b/e2e-tests/development-runtime/plugins/gatsby-plugin-top-layout/gatsby-ssr.js index 457864e..c4df94e 100644 --- a/e2e-tests/development-runtime/plugins/gatsby-plugin-top-layout/gatsby-ssr.js +++ b/e2e-tests/development-runtime/plugins/gatsby-plugin-top-layout/gatsby-ssr.js @@ -1,5 +1,5 @@ -import React from 'react'; -import TopLayout from './top-layout'; +import React from "react"; +import TopLayout from "./top-layout"; export const wrapRootElement = ({ element }) => { return {element}; diff --git a/e2e-tests/development-runtime/plugins/gatsby-plugin-top-layout/top-layout.js b/e2e-tests/development-runtime/plugins/gatsby-plugin-top-layout/top-layout.js index 8d52033..c0f491a 100644 --- a/e2e-tests/development-runtime/plugins/gatsby-plugin-top-layout/top-layout.js +++ b/e2e-tests/development-runtime/plugins/gatsby-plugin-top-layout/top-layout.js @@ -1,11 +1,19 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import { Helmet } from 'react-helmet'; -import CssBaseline from '@material-ui/core/CssBaseline'; -import { ThemeProvider } from '@material-ui/styles'; -import theme from '../../src/theme'; +import React from "react"; +import PropTypes from "prop-types"; +import { Helmet } from "react-helmet"; +import CssBaseline from "@material-ui/core/CssBaseline"; +import { ThemeProvider } from "@material-ui/styles"; +import theme from "../../src/theme"; + +let injectFirstNode; export default function TopLayout(props) { + if (typeof window !== `undefined` && !injectFirstNode) { + const head = document.head; + injectFirstNode = document.createComment(`mui-inject-first`); + head.insertBefore(injectFirstNode, head.firstChild); + } + return ( <> diff --git a/e2e-tests/development-runtime/src/components/link.js b/e2e-tests/development-runtime/src/components/link.js index 9ce4fcc..bd45910 100644 --- a/e2e-tests/development-runtime/src/components/link.js +++ b/e2e-tests/development-runtime/src/components/link.js @@ -1,6 +1,6 @@ -import React from 'react'; -import MuiLink from '@material-ui/core/Link'; -import { Link as GastsbyLink } from 'gatsby'; +import React from "react"; +import MuiLink from "@material-ui/core/Link"; +import { Link as GastsbyLink } from "gatsby"; function Link(props) { return ; diff --git a/e2e-tests/development-runtime/src/components/pro-tip.js b/e2e-tests/development-runtime/src/components/pro-tip.js index 686e22a..0ccf6b1 100644 --- a/e2e-tests/development-runtime/src/components/pro-tip.js +++ b/e2e-tests/development-runtime/src/components/pro-tip.js @@ -1,8 +1,8 @@ -import React from 'react'; -import { makeStyles } from '@material-ui/core/styles'; -import Link from '@material-ui/core/Link'; -import SvgIcon from '@material-ui/core/SvgIcon'; -import Typography from '@material-ui/core/Typography'; +import React from "react"; +import { makeStyles } from "@material-ui/core/styles"; +import Link from "@material-ui/core/Link"; +import SvgIcon from "@material-ui/core/SvgIcon"; +import Typography from "@material-ui/core/Typography"; function LightBulbIcon(props) { return ( diff --git a/e2e-tests/development-runtime/src/pages/about.js b/e2e-tests/development-runtime/src/pages/about.js index 2ef270b..a0f7fa3 100644 --- a/e2e-tests/development-runtime/src/pages/about.js +++ b/e2e-tests/development-runtime/src/pages/about.js @@ -1,11 +1,11 @@ -import React from 'react'; -import Container from '@material-ui/core/Container'; -import Typography from '@material-ui/core/Typography'; -import Box from '@material-ui/core/Box'; -import MuiLink from '@material-ui/core/Link'; +import React from "react"; +import Container from "@material-ui/core/Container"; +import Typography from "@material-ui/core/Typography"; +import Box from "@material-ui/core/Box"; +import MuiLink from "@material-ui/core/Link"; -import ProTip from '../components/pro-tip'; -import Link from '../components/link'; +import ProTip from "../components/pro-tip"; +import Link from "../components/link"; function MadeWithLove() { return ( diff --git a/e2e-tests/development-runtime/src/pages/index.js b/e2e-tests/development-runtime/src/pages/index.js index 48f78b3..0c5cf2b 100644 --- a/e2e-tests/development-runtime/src/pages/index.js +++ b/e2e-tests/development-runtime/src/pages/index.js @@ -1,29 +1,21 @@ -import React from 'react'; -import Container from '@material-ui/core/Container'; -import Typography from '@material-ui/core/Typography'; -import Box from '@material-ui/core/Box'; -import MuiLink from '@material-ui/core/Link'; -import styled from 'styled-components'; +import React from "react"; +import Container from "@material-ui/core/Container"; +import Typography from "@material-ui/core/Typography"; +import Box from "@material-ui/core/Box"; +import MuiLink from "@material-ui/core/Link"; -import ProTip from '../components/pro-tip'; -import Link from '../components/link'; - -const StyledH2 = styled(Typography)` - color: red; -`; +import ProTip from "../components/pro-tip"; +import Link from "../components/link"; function MadeWithLove() { return ( - <> - - `Built with love by the ` - - Material-UI - - {` team.`} - - StyledH2, should be red - + + {`Built with love by the `} + + Material-UI + + {` team.`} + ); } diff --git a/e2e-tests/development-runtime/src/styles-provider-props.js b/e2e-tests/development-runtime/src/styles-provider-props.js new file mode 100644 index 0000000..282819d --- /dev/null +++ b/e2e-tests/development-runtime/src/styles-provider-props.js @@ -0,0 +1,8 @@ +import { jssPreset } from "@material-ui/styles"; +import { create } from "jss"; + +const stylesProviderProps = { + jss: create({ ...jssPreset(), insertionPoint: `mui-inject-first` }), +}; + +export default stylesProviderProps; diff --git a/e2e-tests/development-runtime/src/theme.js b/e2e-tests/development-runtime/src/theme.js index 0cb565e..f32a60a 100644 --- a/e2e-tests/development-runtime/src/theme.js +++ b/e2e-tests/development-runtime/src/theme.js @@ -1,5 +1,5 @@ -import red from '@material-ui/core/colors/red'; -import { createMuiTheme } from '@material-ui/core/styles'; +import red from "@material-ui/core/colors/red"; +import { createMuiTheme } from "@material-ui/core/styles"; // A custom theme for this app const theme = createMuiTheme({ diff --git a/e2e-tests/development-runtime/src/utils/styles-provider-props.js b/e2e-tests/development-runtime/src/utils/styles-provider-props.js deleted file mode 100644 index 4e05cec..0000000 --- a/e2e-tests/development-runtime/src/utils/styles-provider-props.js +++ /dev/null @@ -1,17 +0,0 @@ -import { jssPreset } from '@material-ui/styles'; -import { create } from 'jss'; - -const jssOptions = { - ...jssPreset(), - insertionPoint: document.getElementById(`jss-insertion-point`), -}; -const jss = create(jssOptions); - -const stylesProviderProps = { - // disableGeneration: false, - // generateClassName: () => {}, - // injectFirst: false, - jss, -}; - -export default stylesProviderProps; diff --git a/e2e-tests/production-runtime/cypress/support/commands.js b/e2e-tests/production-runtime/cypress/support/commands.js index 37e1fbb..0ed057a 100644 --- a/e2e-tests/production-runtime/cypress/support/commands.js +++ b/e2e-tests/production-runtime/cypress/support/commands.js @@ -1,4 +1,4 @@ -import 'cypress-testing-library/add-commands'; +import "cypress-testing-library/add-commands"; Cypress.Commands.add(`lifecycleCallCount`, action => cy diff --git a/e2e-tests/production-runtime/cypress/support/index.js b/e2e-tests/production-runtime/cypress/support/index.js index 9b667ad..3fd5428 100644 --- a/e2e-tests/production-runtime/cypress/support/index.js +++ b/e2e-tests/production-runtime/cypress/support/index.js @@ -1,2 +1,2 @@ -import 'gatsby-cypress'; -import './commands'; +import "gatsby-cypress"; +import "./commands"; diff --git a/e2e-tests/production-runtime/gatsby-config.js b/e2e-tests/production-runtime/gatsby-config.js index 18a91a6..3b46f1f 100644 --- a/e2e-tests/production-runtime/gatsby-config.js +++ b/e2e-tests/production-runtime/gatsby-config.js @@ -3,15 +3,10 @@ module.exports = { `gatsby-plugin-top-layout`, { resolve: `gatsby-plugin-material-ui`, - // If you want to use styled components you should change the injection order. options: { - stylesProvider: { - // injectFirst: true, - }, + pathToStylesProvider: `src/styles-provider-props`, }, }, - // If you want to use styled components you should add the plugin here. - `gatsby-plugin-styled-components`, `gatsby-plugin-react-helmet`, ], siteMetadata: { diff --git a/e2e-tests/production-runtime/package.json b/e2e-tests/production-runtime/package.json index 86ab678..0f28e6c 100644 --- a/e2e-tests/production-runtime/package.json +++ b/e2e-tests/production-runtime/package.json @@ -6,12 +6,11 @@ "@material-ui/core": "latest", "@material-ui/styles": "latest", "gatsby": "latest", - "gatsby-plugin-material-ui": "^2.0.1", "gatsby-plugin-react-helmet": "latest", "react": "latest", "react-dom": "latest", "react-helmet": "latest", - "cross-env": "^5.2.0" + "cross-env": "latest" }, "license": "MIT", "scripts": { diff --git a/e2e-tests/production-runtime/plugins/gatsby-plugin-top-layout/gatsby-browser.js b/e2e-tests/production-runtime/plugins/gatsby-plugin-top-layout/gatsby-browser.js index 457864e..c4df94e 100644 --- a/e2e-tests/production-runtime/plugins/gatsby-plugin-top-layout/gatsby-browser.js +++ b/e2e-tests/production-runtime/plugins/gatsby-plugin-top-layout/gatsby-browser.js @@ -1,5 +1,5 @@ -import React from 'react'; -import TopLayout from './top-layout'; +import React from "react"; +import TopLayout from "./top-layout"; export const wrapRootElement = ({ element }) => { return {element}; diff --git a/e2e-tests/production-runtime/plugins/gatsby-plugin-top-layout/gatsby-ssr.js b/e2e-tests/production-runtime/plugins/gatsby-plugin-top-layout/gatsby-ssr.js index 457864e..c4df94e 100644 --- a/e2e-tests/production-runtime/plugins/gatsby-plugin-top-layout/gatsby-ssr.js +++ b/e2e-tests/production-runtime/plugins/gatsby-plugin-top-layout/gatsby-ssr.js @@ -1,5 +1,5 @@ -import React from 'react'; -import TopLayout from './top-layout'; +import React from "react"; +import TopLayout from "./top-layout"; export const wrapRootElement = ({ element }) => { return {element}; diff --git a/e2e-tests/production-runtime/plugins/gatsby-plugin-top-layout/top-layout.js b/e2e-tests/production-runtime/plugins/gatsby-plugin-top-layout/top-layout.js index 8d52033..c0f491a 100644 --- a/e2e-tests/production-runtime/plugins/gatsby-plugin-top-layout/top-layout.js +++ b/e2e-tests/production-runtime/plugins/gatsby-plugin-top-layout/top-layout.js @@ -1,11 +1,19 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import { Helmet } from 'react-helmet'; -import CssBaseline from '@material-ui/core/CssBaseline'; -import { ThemeProvider } from '@material-ui/styles'; -import theme from '../../src/theme'; +import React from "react"; +import PropTypes from "prop-types"; +import { Helmet } from "react-helmet"; +import CssBaseline from "@material-ui/core/CssBaseline"; +import { ThemeProvider } from "@material-ui/styles"; +import theme from "../../src/theme"; + +let injectFirstNode; export default function TopLayout(props) { + if (typeof window !== `undefined` && !injectFirstNode) { + const head = document.head; + injectFirstNode = document.createComment(`mui-inject-first`); + head.insertBefore(injectFirstNode, head.firstChild); + } + return ( <> diff --git a/e2e-tests/production-runtime/src/components/link.js b/e2e-tests/production-runtime/src/components/link.js index 9ce4fcc..bd45910 100644 --- a/e2e-tests/production-runtime/src/components/link.js +++ b/e2e-tests/production-runtime/src/components/link.js @@ -1,6 +1,6 @@ -import React from 'react'; -import MuiLink from '@material-ui/core/Link'; -import { Link as GastsbyLink } from 'gatsby'; +import React from "react"; +import MuiLink from "@material-ui/core/Link"; +import { Link as GastsbyLink } from "gatsby"; function Link(props) { return ; diff --git a/e2e-tests/production-runtime/src/components/pro-tip.js b/e2e-tests/production-runtime/src/components/pro-tip.js index 686e22a..0ccf6b1 100644 --- a/e2e-tests/production-runtime/src/components/pro-tip.js +++ b/e2e-tests/production-runtime/src/components/pro-tip.js @@ -1,8 +1,8 @@ -import React from 'react'; -import { makeStyles } from '@material-ui/core/styles'; -import Link from '@material-ui/core/Link'; -import SvgIcon from '@material-ui/core/SvgIcon'; -import Typography from '@material-ui/core/Typography'; +import React from "react"; +import { makeStyles } from "@material-ui/core/styles"; +import Link from "@material-ui/core/Link"; +import SvgIcon from "@material-ui/core/SvgIcon"; +import Typography from "@material-ui/core/Typography"; function LightBulbIcon(props) { return ( diff --git a/e2e-tests/production-runtime/src/pages/about.js b/e2e-tests/production-runtime/src/pages/about.js index 2ef270b..a0f7fa3 100644 --- a/e2e-tests/production-runtime/src/pages/about.js +++ b/e2e-tests/production-runtime/src/pages/about.js @@ -1,11 +1,11 @@ -import React from 'react'; -import Container from '@material-ui/core/Container'; -import Typography from '@material-ui/core/Typography'; -import Box from '@material-ui/core/Box'; -import MuiLink from '@material-ui/core/Link'; +import React from "react"; +import Container from "@material-ui/core/Container"; +import Typography from "@material-ui/core/Typography"; +import Box from "@material-ui/core/Box"; +import MuiLink from "@material-ui/core/Link"; -import ProTip from '../components/pro-tip'; -import Link from '../components/link'; +import ProTip from "../components/pro-tip"; +import Link from "../components/link"; function MadeWithLove() { return ( diff --git a/e2e-tests/production-runtime/src/pages/index.js b/e2e-tests/production-runtime/src/pages/index.js index 4589c94..0c5cf2b 100644 --- a/e2e-tests/production-runtime/src/pages/index.js +++ b/e2e-tests/production-runtime/src/pages/index.js @@ -1,11 +1,11 @@ -import React from 'react'; -import Container from '@material-ui/core/Container'; -import Typography from '@material-ui/core/Typography'; -import Box from '@material-ui/core/Box'; -import MuiLink from '@material-ui/core/Link'; +import React from "react"; +import Container from "@material-ui/core/Container"; +import Typography from "@material-ui/core/Typography"; +import Box from "@material-ui/core/Box"; +import MuiLink from "@material-ui/core/Link"; -import ProTip from '../components/pro-tip'; -import Link from '../components/link'; +import ProTip from "../components/pro-tip"; +import Link from "../components/link"; function MadeWithLove() { return ( diff --git a/e2e-tests/production-runtime/src/styles-provider-props.js b/e2e-tests/production-runtime/src/styles-provider-props.js new file mode 100644 index 0000000..282819d --- /dev/null +++ b/e2e-tests/production-runtime/src/styles-provider-props.js @@ -0,0 +1,8 @@ +import { jssPreset } from "@material-ui/styles"; +import { create } from "jss"; + +const stylesProviderProps = { + jss: create({ ...jssPreset(), insertionPoint: `mui-inject-first` }), +}; + +export default stylesProviderProps; diff --git a/e2e-tests/production-runtime/src/theme.js b/e2e-tests/production-runtime/src/theme.js index 0cb565e..f32a60a 100644 --- a/e2e-tests/production-runtime/src/theme.js +++ b/e2e-tests/production-runtime/src/theme.js @@ -1,5 +1,5 @@ -import red from '@material-ui/core/colors/red'; -import { createMuiTheme } from '@material-ui/core/styles'; +import red from "@material-ui/core/colors/red"; +import { createMuiTheme } from "@material-ui/core/styles"; // A custom theme for this app const theme = createMuiTheme({ diff --git a/gatsby-plugin-material-ui/.gitignore b/gatsby-plugin-material-ui/.gitignore index 73cf396..42c21a5 100644 --- a/gatsby-plugin-material-ui/.gitignore +++ b/gatsby-plugin-material-ui/.gitignore @@ -66,6 +66,6 @@ lib .DS_Store /gatsby-browser.js -/gatsby-ssr.js /gatsby-node.js -.cache \ No newline at end of file +/gatsby-ssr.js +/.cache/ diff --git a/gatsby-plugin-material-ui/README.md b/gatsby-plugin-material-ui/README.md index 585a30a..776fe05 100644 --- a/gatsby-plugin-material-ui/README.md +++ b/gatsby-plugin-material-ui/README.md @@ -1,22 +1,31 @@ # gatsby-plugin-material-ui -> A [Gatsby](https://github.com/gatsbyjs/gatsby) plugin for -> [@material-ui/styles](https://github.com/mui-org/material-ui) with -> built-in server-side rendering support. +> A [Gatsby](https://github.com/gatsbyjs/gatsby) plugin for [@material-ui/styles](https://github.com/mui-org/material-ui) with built-in server-side rendering support. -This is the plugin for Material-UI v4. The plugin for v3 can be found [here](https://github.com/hupe1980/gatsby-plugin-material-ui/tree/v1.2.5). +This is the plugin for Material-UI v4. +The plugin for v3 can be found [here](https://github.com/hupe1980/gatsby-plugin-material-ui/tree/v1.2.5). ## Install -`npm install --save gatsby-plugin-material-ui @material-ui/styles` +```sh +npm install gatsby-plugin-material-ui @material-ui/styles +``` ## How to use -Feel free to use the plugin without any options. +The default options should be enough to cover the most common use cases. + +```js +module.exports = { + plugins: [`gatsby-plugin-material-ui`], +}; +``` + +## Usage with styled-components or else -If using Material-UI together with other styling providers (like styled-components), you should make sure Material-UI styles end up on top of `` (so the other styling providers can overwrite it). This is accomplished by editing `gatsby-config.js` in **one** of the two following ways: +If using Material-UI together with other styling providers (like styled-components), you should make sure Material-UI styles end up on top of `` (so the other styling providers can overwrite it). -1. Add a `stylesProvider` property, and specify `injectFirst: true` (see below). This places Material-UI at the top of head +You can leverage the `injectFirst: true` prop the [`StylesProvider`](https://material-ui.com/styles/api/#stylesprovider) component: ```js module.exports = { @@ -24,8 +33,6 @@ module.exports = { { resolve: `gatsby-plugin-material-ui`, options: { - disableAutoprefixing: false, - disableMinification: false, stylesProvider: { injectFirst: true, }, @@ -35,7 +42,16 @@ module.exports = { }; ``` -2. Alternatively, specify a specific point in `` where the styles will be injected. This is done by spcifying the `pathToStylesProvder` property **instead** of the `stylesProvider` property. It should point to a configuration file, as seen below. You will also find an example configuration file below. +## Autoprefixing and minification + +By default, the plugin adds vendor-specific prefixes and minimizes the server-side CSS. +The following options are available for deactivating: + +| Option | Default | Description | +| -------------------- | ------- | ------------------------------------ | +| disableAutoprefixing | false | Opt-out autoprefixing (autoprefixer) | +| disableMinification | false | Opt-out minification (clean-css) | + ```js module.exports = { @@ -45,50 +61,43 @@ module.exports = { options: { disableAutoprefixing: false, disableMinification: false, - pathToStylesProvider: 'src/utils/styles-provider-props', }, }, ], }; ``` -## Example `styles-provider-props.js` +## Advanced -```js -import { jssPreset } from '@material-ui/styles'; -import { create } from 'jss'; +You can use the `pathToStylesProvider` option instead of the `stylesProvider` one to provide rich objects to the [`StylesProvider`](https://material-ui.com/styles/api/#stylesprovider) component. -const jssOptions = { - ...jssPreset(), - insertionPoint: document.getElementById('jss-insertion-point'), +**gatsby-config.js.js** +``` +module.exports = { + plugins: [ + { + resolve: `gatsby-plugin-material-ui`, + options: { + pathToStylesProvider: `src/styles-provider-props`, + }, + }, + ], }; -const jss = create(jssOptions); + +``` + +**src/styles-provider-props.js** +``` +import { jssPreset } from "@material-ui/styles"; +import { create } from "jss"; const stylesProviderProps = { - // disableGeneration: false, - // generateClassName: () => {}, - // injectFirst: false, - jss, + jss: create({ ...jssPreset(), insertionPoint: `mui-inject-first` }), }; export default stylesProviderProps; ``` -## styles-provider-props.js Options - -- This file accept all props that `StylesProvider` accepts. They are simply passed directly on to `StylesProvider` as specified -- To set a custom insertion point, create a new `jss` instance in this file, and assign it to the the `StylesProvider` `jss` prop (as shown above) -- You have to manually specify the insertion point in `head`, as a `html` comment or a `noscript` tag. [More information on how that is done in Material-UI](https://material-ui.com/customization/css-in-js/#css-injection-order) - -## Autoprefixing and minification - -By default, the plugin adds vendor-specific prefixes and minimizes the server-side CSS. The following options are available for deactivating: - -| Option | Default | Description | -| -------------------- | ------- | ------------------------------------ | -| disableAutoprefixing | false | Opt-out Autoprefixing (autoprefixer) | -| disableMinification | false | Opt-out minification (clean-css) | - ## Examples You can find an official integration example of this plugin [on Material-UI side](https://github.com/mui-org/material-ui/tree/master/examples/gatsby), then you can pick one of the [Page Layout Examples](https://material-ui.com/getting-started/page-layout-examples/). diff --git a/gatsby-plugin-material-ui/package-lock.json b/gatsby-plugin-material-ui/package-lock.json deleted file mode 100644 index 3827c72..0000000 --- a/gatsby-plugin-material-ui/package-lock.json +++ /dev/null @@ -1,1186 +0,0 @@ -{ - "name": "gatsby-plugin-material-ui", - "version": "2.0.0-beta.2", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@babel/code-frame": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", - "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", - "requires": { - "@babel/highlight": "^7.0.0" - } - }, - "@babel/generator": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.4.tgz", - "integrity": "sha512-53UOLK6TVNqKxf7RUh8NE851EHRxOOeVXKbK2bivdb+iziMyk03Sr4eaE9OELCbyZAAafAKPDwF2TPUES5QbxQ==", - "requires": { - "@babel/types": "^7.4.4", - "jsesc": "^2.5.1", - "lodash": "^4.17.11", - "source-map": "^0.5.0", - "trim-right": "^1.0.1" - } - }, - "@babel/helper-annotate-as-pure": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz", - "integrity": "sha512-3UYcJUj9kvSLbLbUIfQTqzcy5VX7GRZ/CCDrnOaZorFFM01aXp1+GJwuFGV4NDDoAS+mOUyHcO6UD/RfqOks3Q==", - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.1.0.tgz", - "integrity": "sha512-qNSR4jrmJ8M1VMM9tibvyRAHXQs2PmaksQF7c1CGJNipfe3D8p+wgNwgso/P2A2r2mdgBWAXljNWR0QRZAMW8w==", - "requires": { - "@babel/helper-explode-assignable-expression": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-builder-react-jsx": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.3.0.tgz", - "integrity": "sha512-MjA9KgwCuPEkQd9ncSXvSyJ5y+j2sICHyrI0M3L+6fnS4wMSNDc1ARXsbTfbb2cXHn17VisSnU/sHFTCxVxSMw==", - "requires": { - "@babel/types": "^7.3.0", - "esutils": "^2.0.0" - } - }, - "@babel/helper-call-delegate": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.4.4.tgz", - "integrity": "sha512-l79boDFJ8S1c5hvQvG+rc+wHw6IuH7YldmRKsYtpbawsxURu/paVy57FZMomGK22/JckepaikOkY0MoAmdyOlQ==", - "requires": { - "@babel/helper-hoist-variables": "^7.4.4", - "@babel/traverse": "^7.4.4", - "@babel/types": "^7.4.4" - } - }, - "@babel/helper-create-class-features-plugin": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.4.4.tgz", - "integrity": "sha512-UbBHIa2qeAGgyiNR9RszVF7bUHEdgS4JAUNT8SiqrAN6YJVxlOxeLr5pBzb5kan302dejJ9nla4RyKcR1XT6XA==", - "requires": { - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-member-expression-to-functions": "^7.0.0", - "@babel/helper-optimise-call-expression": "^7.0.0", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.4.4", - "@babel/helper-split-export-declaration": "^7.4.4" - } - }, - "@babel/helper-define-map": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.4.4.tgz", - "integrity": "sha512-IX3Ln8gLhZpSuqHJSnTNBWGDE9kdkTEWl21A/K7PQ00tseBwbqCHTvNLHSBd9M0R5rER4h5Rsvj9vw0R5SieBg==", - "requires": { - "@babel/helper-function-name": "^7.1.0", - "@babel/types": "^7.4.4", - "lodash": "^4.17.11" - } - }, - "@babel/helper-explode-assignable-expression": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.1.0.tgz", - "integrity": "sha512-NRQpfHrJ1msCHtKjbzs9YcMmJZOg6mQMmGRB+hbamEdG5PNpaSm95275VD92DvJKuyl0s2sFiDmMZ+EnnvufqA==", - "requires": { - "@babel/traverse": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-function-name": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", - "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", - "requires": { - "@babel/helper-get-function-arity": "^7.0.0", - "@babel/template": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", - "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-hoist-variables": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.4.4.tgz", - "integrity": "sha512-VYk2/H/BnYbZDDg39hr3t2kKyifAm1W6zHRfhx8jGjIHpQEBv9dry7oQ2f3+J703TLu69nYdxsovl0XYfcnK4w==", - "requires": { - "@babel/types": "^7.4.4" - } - }, - "@babel/helper-member-expression-to-functions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0.tgz", - "integrity": "sha512-avo+lm/QmZlv27Zsi0xEor2fKcqWG56D5ae9dzklpIaY7cQMK5N8VSpaNVPPagiqmy7LrEjK1IWdGMOqPu5csg==", - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-module-imports": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz", - "integrity": "sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A==", - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-module-transforms": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.4.4.tgz", - "integrity": "sha512-3Z1yp8TVQf+B4ynN7WoHPKS8EkdTbgAEy0nU0rs/1Kw4pDgmvYH3rz3aI11KgxKCba2cn7N+tqzV1mY2HMN96w==", - "requires": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/helper-simple-access": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.4.4", - "@babel/template": "^7.4.4", - "@babel/types": "^7.4.4", - "lodash": "^4.17.11" - } - }, - "@babel/helper-optimise-call-expression": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz", - "integrity": "sha512-u8nd9NQePYNQV8iPWu/pLLYBqZBa4ZaY1YWRFMuxrid94wKI1QNt67NEZ7GAe5Kc/0LLScbim05xZFWkAdrj9g==", - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-plugin-utils": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz", - "integrity": "sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==" - }, - "@babel/helper-regex": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.4.4.tgz", - "integrity": "sha512-Y5nuB/kESmR3tKjU8Nkn1wMGEx1tjJX076HBMeL3XLQCu6vA/YRzuTW0bbb+qRnXvQGn+d6Rx953yffl8vEy7Q==", - "requires": { - "lodash": "^4.17.11" - } - }, - "@babel/helper-remap-async-to-generator": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.1.0.tgz", - "integrity": "sha512-3fOK0L+Fdlg8S5al8u/hWE6vhufGSn0bN09xm2LXMy//REAF8kDCrYoOBKYmA8m5Nom+sV9LyLCwrFynA8/slg==", - "requires": { - "@babel/helper-annotate-as-pure": "^7.0.0", - "@babel/helper-wrap-function": "^7.1.0", - "@babel/template": "^7.1.0", - "@babel/traverse": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-replace-supers": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.4.4.tgz", - "integrity": "sha512-04xGEnd+s01nY1l15EuMS1rfKktNF+1CkKmHoErDppjAAZL+IUBZpzT748x262HF7fibaQPhbvWUl5HeSt1EXg==", - "requires": { - "@babel/helper-member-expression-to-functions": "^7.0.0", - "@babel/helper-optimise-call-expression": "^7.0.0", - "@babel/traverse": "^7.4.4", - "@babel/types": "^7.4.4" - } - }, - "@babel/helper-simple-access": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz", - "integrity": "sha512-Vk+78hNjRbsiu49zAPALxTb+JUQCz1aolpd8osOF16BGnLtseD21nbHgLPGUwrXEurZgiCOUmvs3ExTu4F5x6w==", - "requires": { - "@babel/template": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz", - "integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==", - "requires": { - "@babel/types": "^7.4.4" - } - }, - "@babel/helper-wrap-function": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.2.0.tgz", - "integrity": "sha512-o9fP1BZLLSrYlxYEYyl2aS+Flun5gtjTIG8iln+XuEzQTs0PLagAGSXUcqruJwD5fM48jzIEggCKpIfWTcR7pQ==", - "requires": { - "@babel/helper-function-name": "^7.1.0", - "@babel/template": "^7.1.0", - "@babel/traverse": "^7.1.0", - "@babel/types": "^7.2.0" - } - }, - "@babel/highlight": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", - "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", - "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^4.0.0" - } - }, - "@babel/parser": { - "version": "7.4.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.5.tgz", - "integrity": "sha512-9mUqkL1FF5T7f0WDFfAoDdiMVPWsdD1gZYzSnaXsxUCUqzuch/8of9G3VUSNiZmMBoRxT3neyVsqeiL/ZPcjew==" - }, - "@babel/plugin-proposal-async-generator-functions": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz", - "integrity": "sha512-+Dfo/SCQqrwx48ptLVGLdE39YtWRuKc/Y9I5Fy0P1DDBB9lsAHpjcEJQt+4IifuSOSTLBKJObJqMvaO1pIE8LQ==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-remap-async-to-generator": "^7.1.0", - "@babel/plugin-syntax-async-generators": "^7.2.0" - } - }, - "@babel/plugin-proposal-class-properties": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.4.4.tgz", - "integrity": "sha512-WjKTI8g8d5w1Bc9zgwSz2nfrsNQsXcCf9J9cdCvrJV6RF56yztwm4TmJC0MgJ9tvwO9gUA/mcYe89bLdGfiXFg==", - "requires": { - "@babel/helper-create-class-features-plugin": "^7.4.4", - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-proposal-json-strings": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.2.0.tgz", - "integrity": "sha512-MAFV1CA/YVmYwZG0fBQyXhmj0BHCB5egZHCKWIFVv/XCxAeVGIHfos3SwDck4LvCllENIAg7xMKOG5kH0dzyUg==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-json-strings": "^7.2.0" - } - }, - "@babel/plugin-proposal-object-rest-spread": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.4.4.tgz", - "integrity": "sha512-dMBG6cSPBbHeEBdFXeQ2QLc5gUpg4Vkaz8octD4aoW/ISO+jBOcsuxYL7bsb5WSu8RLP6boxrBIALEHgoHtO9g==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-object-rest-spread": "^7.2.0" - } - }, - "@babel/plugin-proposal-optional-catch-binding": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.2.0.tgz", - "integrity": "sha512-mgYj3jCcxug6KUcX4OBoOJz3CMrwRfQELPQ5560F70YQUBZB7uac9fqaWamKR1iWUzGiK2t0ygzjTScZnVz75g==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-optional-catch-binding": "^7.2.0" - } - }, - "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.4.4.tgz", - "integrity": "sha512-j1NwnOqMG9mFUOH58JTFsA/+ZYzQLUZ/drqWUqxCYLGeu2JFZL8YrNC9hBxKmWtAuOCHPcRpgv7fhap09Fb4kA==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-regex": "^7.4.4", - "regexpu-core": "^4.5.4" - } - }, - "@babel/plugin-syntax-async-generators": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.2.0.tgz", - "integrity": "sha512-1ZrIRBv2t0GSlcwVoQ6VgSLpLgiN/FVQUzt9znxo7v2Ov4jJrs8RY8tv0wvDmFN3qIdMKWrmMMW6yZ0G19MfGg==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-syntax-dynamic-import": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.2.0.tgz", - "integrity": "sha512-mVxuJ0YroI/h/tbFTPGZR8cv6ai+STMKNBq0f8hFxsxWjl94qqhsb+wXbpNMDPU3cfR1TIsVFzU3nXyZMqyK4w==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-syntax-json-strings": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.2.0.tgz", - "integrity": "sha512-5UGYnMSLRE1dqqZwug+1LISpA403HzlSfsg6P9VXU6TBjcSHeNlw4DxDx7LgpF+iKZoOG/+uzqoRHTdcUpiZNg==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-syntax-jsx": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.2.0.tgz", - "integrity": "sha512-VyN4QANJkRW6lDBmENzRszvZf3/4AXaj9YR7GwrWeeN9tEBPuXbmDYVU9bYBN0D70zCWVwUy0HWq2553VCb6Hw==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-syntax-object-rest-spread": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz", - "integrity": "sha512-t0JKGgqk2We+9may3t0xDdmneaXmyxq0xieYcKHxIsrJO64n1OiMWNUtc5gQK1PA0NpdCRrtZp4z+IUaKugrSA==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-syntax-optional-catch-binding": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.2.0.tgz", - "integrity": "sha512-bDe4xKNhb0LI7IvZHiA13kff0KEfaGX/Hv4lMA9+7TEc63hMNvfKo6ZFpXhKuEp+II/q35Gc4NoMeDZyaUbj9w==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-arrow-functions": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz", - "integrity": "sha512-ER77Cax1+8/8jCB9fo4Ud161OZzWN5qawi4GusDuRLcDbDG+bIGYY20zb2dfAFdTRGzrfq2xZPvF0R64EHnimg==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-async-to-generator": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.4.4.tgz", - "integrity": "sha512-YiqW2Li8TXmzgbXw+STsSqPBPFnGviiaSp6CYOq55X8GQ2SGVLrXB6pNid8HkqkZAzOH6knbai3snhP7v0fNwA==", - "requires": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-remap-async-to-generator": "^7.1.0" - } - }, - "@babel/plugin-transform-block-scoped-functions": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.2.0.tgz", - "integrity": "sha512-ntQPR6q1/NKuphly49+QiQiTN0O63uOwjdD6dhIjSWBI5xlrbUFh720TIpzBhpnrLfv2tNH/BXvLIab1+BAI0w==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-block-scoping": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.4.4.tgz", - "integrity": "sha512-jkTUyWZcTrwxu5DD4rWz6rDB5Cjdmgz6z7M7RLXOJyCUkFBawssDGcGh8M/0FTSB87avyJI1HsTwUXp9nKA1PA==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "lodash": "^4.17.11" - } - }, - "@babel/plugin-transform-classes": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.4.4.tgz", - "integrity": "sha512-/e44eFLImEGIpL9qPxSRat13I5QNRgBLu2hOQJCF7VLy/otSM/sypV1+XaIw5+502RX/+6YaSAPmldk+nhHDPw==", - "requires": { - "@babel/helper-annotate-as-pure": "^7.0.0", - "@babel/helper-define-map": "^7.4.4", - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-optimise-call-expression": "^7.0.0", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.4.4", - "@babel/helper-split-export-declaration": "^7.4.4", - "globals": "^11.1.0" - } - }, - "@babel/plugin-transform-computed-properties": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.2.0.tgz", - "integrity": "sha512-kP/drqTxY6Xt3NNpKiMomfgkNn4o7+vKxK2DDKcBG9sHj51vHqMBGy8wbDS/J4lMxnqs153/T3+DmCEAkC5cpA==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-destructuring": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.4.4.tgz", - "integrity": "sha512-/aOx+nW0w8eHiEHm+BTERB2oJn5D127iye/SUQl7NjHy0lf+j7h4MKMMSOwdazGq9OxgiNADncE+SRJkCxjZpQ==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-dotall-regex": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.4.4.tgz", - "integrity": "sha512-P05YEhRc2h53lZDjRPk/OektxCVevFzZs2Gfjd545Wde3k+yFDbXORgl2e0xpbq8mLcKJ7Idss4fAg0zORN/zg==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-regex": "^7.4.4", - "regexpu-core": "^4.5.4" - } - }, - "@babel/plugin-transform-duplicate-keys": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.2.0.tgz", - "integrity": "sha512-q+yuxW4DsTjNceUiTzK0L+AfQ0zD9rWaTLiUqHA8p0gxx7lu1EylenfzjeIWNkPy6e/0VG/Wjw9uf9LueQwLOw==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-exponentiation-operator": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.2.0.tgz", - "integrity": "sha512-umh4hR6N7mu4Elq9GG8TOu9M0bakvlsREEC+ialrQN6ABS4oDQ69qJv1VtR3uxlKMCQMCvzk7vr17RHKcjx68A==", - "requires": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.1.0", - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-for-of": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.4.4.tgz", - "integrity": "sha512-9T/5Dlr14Z9TIEXLXkt8T1DU7F24cbhwhMNUziN3hB1AXoZcdzPcTiKGRn/6iOymDqtTKWnr/BtRKN9JwbKtdQ==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-function-name": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.4.4.tgz", - "integrity": "sha512-iU9pv7U+2jC9ANQkKeNF6DrPy4GBa4NWQtl6dHB4Pb3izX2JOEvDTFarlNsBj/63ZEzNNIAMs3Qw4fNCcSOXJA==", - "requires": { - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-literals": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.2.0.tgz", - "integrity": "sha512-2ThDhm4lI4oV7fVQ6pNNK+sx+c/GM5/SaML0w/r4ZB7sAneD/piDJtwdKlNckXeyGK7wlwg2E2w33C/Hh+VFCg==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-member-expression-literals": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.2.0.tgz", - "integrity": "sha512-HiU3zKkSU6scTidmnFJ0bMX8hz5ixC93b4MHMiYebmk2lUVNGOboPsqQvx5LzooihijUoLR/v7Nc1rbBtnc7FA==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-modules-amd": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.2.0.tgz", - "integrity": "sha512-mK2A8ucqz1qhrdqjS9VMIDfIvvT2thrEsIQzbaTdc5QFzhDjQv2CkJJ5f6BXIkgbmaoax3zBr2RyvV/8zeoUZw==", - "requires": { - "@babel/helper-module-transforms": "^7.1.0", - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-modules-commonjs": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.4.4.tgz", - "integrity": "sha512-4sfBOJt58sEo9a2BQXnZq+Q3ZTSAUXyK3E30o36BOGnJ+tvJ6YSxF0PG6kERvbeISgProodWuI9UVG3/FMY6iw==", - "requires": { - "@babel/helper-module-transforms": "^7.4.4", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-simple-access": "^7.1.0" - } - }, - "@babel/plugin-transform-modules-systemjs": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.4.4.tgz", - "integrity": "sha512-MSiModfILQc3/oqnG7NrP1jHaSPryO6tA2kOMmAQApz5dayPxWiHqmq4sWH2xF5LcQK56LlbKByCd8Aah/OIkQ==", - "requires": { - "@babel/helper-hoist-variables": "^7.4.4", - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-modules-umd": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.2.0.tgz", - "integrity": "sha512-BV3bw6MyUH1iIsGhXlOK6sXhmSarZjtJ/vMiD9dNmpY8QXFFQTj+6v92pcfy1iqa8DeAfJFwoxcrS/TUZda6sw==", - "requires": { - "@babel/helper-module-transforms": "^7.1.0", - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.4.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.4.5.tgz", - "integrity": "sha512-z7+2IsWafTBbjNsOxU/Iv5CvTJlr5w4+HGu1HovKYTtgJ362f7kBcQglkfmlspKKZ3bgrbSGvLfNx++ZJgCWsg==", - "requires": { - "regexp-tree": "^0.1.6" - } - }, - "@babel/plugin-transform-new-target": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.4.4.tgz", - "integrity": "sha512-r1z3T2DNGQwwe2vPGZMBNjioT2scgWzK9BCnDEh+46z8EEwXBq24uRzd65I7pjtugzPSj921aM15RpESgzsSuA==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-object-super": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.2.0.tgz", - "integrity": "sha512-VMyhPYZISFZAqAPVkiYb7dUe2AsVi2/wCT5+wZdsNO31FojQJa9ns40hzZ6U9f50Jlq4w6qwzdBB2uwqZ00ebg==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.1.0" - } - }, - "@babel/plugin-transform-parameters": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.4.4.tgz", - "integrity": "sha512-oMh5DUO1V63nZcu/ZVLQFqiihBGo4OpxJxR1otF50GMeCLiRx5nUdtokd+u9SuVJrvvuIh9OosRFPP4pIPnwmw==", - "requires": { - "@babel/helper-call-delegate": "^7.4.4", - "@babel/helper-get-function-arity": "^7.0.0", - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-property-literals": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.2.0.tgz", - "integrity": "sha512-9q7Dbk4RhgcLp8ebduOpCbtjh7C0itoLYHXd9ueASKAG/is5PQtMR5VJGka9NKqGhYEGn5ITahd4h9QeBMylWQ==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-react-display-name": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.2.0.tgz", - "integrity": "sha512-Htf/tPa5haZvRMiNSQSFifK12gtr/8vwfr+A9y69uF0QcU77AVu4K7MiHEkTxF7lQoHOL0F9ErqgfNEAKgXj7A==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-react-jsx": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.3.0.tgz", - "integrity": "sha512-a/+aRb7R06WcKvQLOu4/TpjKOdvVEKRLWFpKcNuHhiREPgGRB4TQJxq07+EZLS8LFVYpfq1a5lDUnuMdcCpBKg==", - "requires": { - "@babel/helper-builder-react-jsx": "^7.3.0", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-jsx": "^7.2.0" - } - }, - "@babel/plugin-transform-react-jsx-self": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.2.0.tgz", - "integrity": "sha512-v6S5L/myicZEy+jr6ielB0OR8h+EH/1QFx/YJ7c7Ua+7lqsjj/vW6fD5FR9hB/6y7mGbfT4vAURn3xqBxsUcdg==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-jsx": "^7.2.0" - } - }, - "@babel/plugin-transform-react-jsx-source": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.2.0.tgz", - "integrity": "sha512-A32OkKTp4i5U6aE88GwwcuV4HAprUgHcTq0sSafLxjr6AW0QahrCRCjxogkbbcdtpbXkuTOlgpjophCxb6sh5g==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-jsx": "^7.2.0" - } - }, - "@babel/plugin-transform-regenerator": { - "version": "7.4.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.4.5.tgz", - "integrity": "sha512-gBKRh5qAaCWntnd09S8QC7r3auLCqq5DI6O0DlfoyDjslSBVqBibrMdsqO+Uhmx3+BlOmE/Kw1HFxmGbv0N9dA==", - "requires": { - "regenerator-transform": "^0.14.0" - } - }, - "@babel/plugin-transform-reserved-words": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.2.0.tgz", - "integrity": "sha512-fz43fqW8E1tAB3DKF19/vxbpib1fuyCwSPE418ge5ZxILnBhWyhtPgz8eh1RCGGJlwvksHkyxMxh0eenFi+kFw==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-runtime": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.4.4.tgz", - "integrity": "sha512-aMVojEjPszvau3NRg+TIH14ynZLvPewH4xhlCW1w6A3rkxTS1m4uwzRclYR9oS+rl/dr+kT+pzbfHuAWP/lc7Q==", - "requires": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/helper-plugin-utils": "^7.0.0", - "resolve": "^1.8.1", - "semver": "^5.5.1" - } - }, - "@babel/plugin-transform-shorthand-properties": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.2.0.tgz", - "integrity": "sha512-QP4eUM83ha9zmYtpbnyjTLAGKQritA5XW/iG9cjtuOI8s1RuL/3V6a3DeSHfKutJQ+ayUfeZJPcnCYEQzaPQqg==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-spread": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.2.2.tgz", - "integrity": "sha512-KWfky/58vubwtS0hLqEnrWJjsMGaOeSBn90Ezn5Jeg9Z8KKHmELbP1yGylMlm5N6TPKeY9A2+UaSYLdxahg01w==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-sticky-regex": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.2.0.tgz", - "integrity": "sha512-KKYCoGaRAf+ckH8gEL3JHUaFVyNHKe3ASNsZ+AlktgHevvxGigoIttrEJb8iKN03Q7Eazlv1s6cx2B2cQ3Jabw==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-regex": "^7.0.0" - } - }, - "@babel/plugin-transform-template-literals": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.4.4.tgz", - "integrity": "sha512-mQrEC4TWkhLN0z8ygIvEL9ZEToPhG5K7KDW3pzGqOfIGZ28Jb0POUkeWcoz8HnHvhFy6dwAT1j8OzqN8s804+g==", - "requires": { - "@babel/helper-annotate-as-pure": "^7.0.0", - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-typeof-symbol": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.2.0.tgz", - "integrity": "sha512-2LNhETWYxiYysBtrBTqL8+La0jIoQQnIScUJc74OYvUGRmkskNY4EzLCnjHBzdmb38wqtTaixpo1NctEcvMDZw==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-unicode-regex": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.4.4.tgz", - "integrity": "sha512-il+/XdNw01i93+M9J9u4T7/e/Ue/vWfNZE4IRUQjplu2Mqb/AFTDimkw2tdEdSH50wuQXZAbXSql0UphQke+vA==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-regex": "^7.4.4", - "regexpu-core": "^4.5.4" - } - }, - "@babel/preset-env": { - "version": "7.4.5", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.4.5.tgz", - "integrity": "sha512-f2yNVXM+FsR5V8UwcFeIHzHWgnhXg3NpRmy0ADvALpnhB0SLbCvrCRr4BLOUYbQNLS+Z0Yer46x9dJXpXewI7w==", - "requires": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-proposal-async-generator-functions": "^7.2.0", - "@babel/plugin-proposal-json-strings": "^7.2.0", - "@babel/plugin-proposal-object-rest-spread": "^7.4.4", - "@babel/plugin-proposal-optional-catch-binding": "^7.2.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", - "@babel/plugin-syntax-async-generators": "^7.2.0", - "@babel/plugin-syntax-json-strings": "^7.2.0", - "@babel/plugin-syntax-object-rest-spread": "^7.2.0", - "@babel/plugin-syntax-optional-catch-binding": "^7.2.0", - "@babel/plugin-transform-arrow-functions": "^7.2.0", - "@babel/plugin-transform-async-to-generator": "^7.4.4", - "@babel/plugin-transform-block-scoped-functions": "^7.2.0", - "@babel/plugin-transform-block-scoping": "^7.4.4", - "@babel/plugin-transform-classes": "^7.4.4", - "@babel/plugin-transform-computed-properties": "^7.2.0", - "@babel/plugin-transform-destructuring": "^7.4.4", - "@babel/plugin-transform-dotall-regex": "^7.4.4", - "@babel/plugin-transform-duplicate-keys": "^7.2.0", - "@babel/plugin-transform-exponentiation-operator": "^7.2.0", - "@babel/plugin-transform-for-of": "^7.4.4", - "@babel/plugin-transform-function-name": "^7.4.4", - "@babel/plugin-transform-literals": "^7.2.0", - "@babel/plugin-transform-member-expression-literals": "^7.2.0", - "@babel/plugin-transform-modules-amd": "^7.2.0", - "@babel/plugin-transform-modules-commonjs": "^7.4.4", - "@babel/plugin-transform-modules-systemjs": "^7.4.4", - "@babel/plugin-transform-modules-umd": "^7.2.0", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.4.5", - "@babel/plugin-transform-new-target": "^7.4.4", - "@babel/plugin-transform-object-super": "^7.2.0", - "@babel/plugin-transform-parameters": "^7.4.4", - "@babel/plugin-transform-property-literals": "^7.2.0", - "@babel/plugin-transform-regenerator": "^7.4.5", - "@babel/plugin-transform-reserved-words": "^7.2.0", - "@babel/plugin-transform-shorthand-properties": "^7.2.0", - "@babel/plugin-transform-spread": "^7.2.0", - "@babel/plugin-transform-sticky-regex": "^7.2.0", - "@babel/plugin-transform-template-literals": "^7.4.4", - "@babel/plugin-transform-typeof-symbol": "^7.2.0", - "@babel/plugin-transform-unicode-regex": "^7.4.4", - "@babel/types": "^7.4.4", - "browserslist": "^4.6.0", - "core-js-compat": "^3.1.1", - "invariant": "^2.2.2", - "js-levenshtein": "^1.1.3", - "semver": "^5.5.0" - } - }, - "@babel/preset-react": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.0.0.tgz", - "integrity": "sha512-oayxyPS4Zj+hF6Et11BwuBkmpgT/zMxyuZgFrMeZID6Hdh3dGlk4sHCAhdBCpuCKW2ppBfl2uCCetlrUIJRY3w==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-transform-react-display-name": "^7.0.0", - "@babel/plugin-transform-react-jsx": "^7.0.0", - "@babel/plugin-transform-react-jsx-self": "^7.0.0", - "@babel/plugin-transform-react-jsx-source": "^7.0.0" - } - }, - "@babel/runtime": { - "version": "7.4.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.4.5.tgz", - "integrity": "sha512-TuI4qpWZP6lGOGIuGWtp9sPluqYICmbk8T/1vpSysqJxRPkudh/ofFWyqdcMsDf2s7KvDL4/YHgKyvcS3g9CJQ==", - "requires": { - "regenerator-runtime": "^0.13.2" - } - }, - "@babel/template": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.4.tgz", - "integrity": "sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw==", - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.4.4", - "@babel/types": "^7.4.4" - } - }, - "@babel/traverse": { - "version": "7.4.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.5.tgz", - "integrity": "sha512-Vc+qjynwkjRmIFGxy0KYoPj4FdVDxLej89kMHFsWScq999uX+pwcX4v9mWRjW0KcAYTPAuVQl2LKP1wEVLsp+A==", - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.4.4", - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.4.4", - "@babel/parser": "^7.4.5", - "@babel/types": "^7.4.4", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.11" - } - }, - "@babel/types": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.4.tgz", - "integrity": "sha512-dOllgYdnEFOebhkKCjzSVFqw/PmmB8pH6RGOWkY4GsboQNd47b1fBThBSwlHAq9alF9vc1M3+6oqR47R50L0tQ==", - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.11", - "to-fast-properties": "^2.0.0" - } - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "babel-plugin-macros": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-2.6.1.tgz", - "integrity": "sha512-6W2nwiXme6j1n2erPOnmRiWfObUhWH7Qw1LMi9XZy8cj+KtESu3T6asZvtk5bMQQjX8te35o7CFueiSdL/2NmQ==", - "requires": { - "@babel/runtime": "^7.4.2", - "cosmiconfig": "^5.2.0", - "resolve": "^1.10.0" - } - }, - "babel-preset-gatsby": { - "version": "0.1.11", - "resolved": "https://registry.npmjs.org/babel-preset-gatsby/-/babel-preset-gatsby-0.1.11.tgz", - "integrity": "sha512-n8Tg1r1J9juDc8GI0afrOFrEJ4No+lfylcYN2QLi90dvGl9VlfZIqoEf9bpw1maop+Ksz56NavxP6U0BHeZLqg==", - "requires": { - "@babel/plugin-proposal-class-properties": "^7.0.0", - "@babel/plugin-syntax-dynamic-import": "^7.0.0", - "@babel/plugin-transform-runtime": "^7.0.0", - "@babel/preset-env": "^7.4.1", - "@babel/preset-react": "^7.0.0", - "babel-plugin-macros": "^2.4.2" - } - }, - "browserslist": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.6.2.tgz", - "integrity": "sha512-2neU/V0giQy9h3XMPwLhEY3+Ao0uHSwHvU8Q1Ea6AgLVL1sXbX3dzPrJ8NWe5Hi4PoTkCYXOtVR9rfRLI0J/8Q==", - "requires": { - "caniuse-lite": "^1.0.30000974", - "electron-to-chromium": "^1.3.150", - "node-releases": "^1.1.23" - } - }, - "caller-callsite": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", - "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", - "requires": { - "callsites": "^2.0.0" - } - }, - "caller-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", - "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", - "requires": { - "caller-callsite": "^2.0.0" - } - }, - "callsites": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", - "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=" - }, - "caniuse-lite": { - "version": "1.0.30000974", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000974.tgz", - "integrity": "sha512-xc3rkNS/Zc3CmpMKuczWEdY2sZgx09BkAxfvkxlAEBTqcMHeL8QnPqhKse+5sRTi3nrw2pJwToD2WvKn1Uhvww==" - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "core-js-compat": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.1.4.tgz", - "integrity": "sha512-Z5zbO9f1d0YrJdoaQhphVAnKPimX92D6z8lCGphH89MNRxlL1prI9ExJPqVwP0/kgkQCv8c4GJGT8X16yUncOg==", - "requires": { - "browserslist": "^4.6.2", - "core-js-pure": "3.1.4", - "semver": "^6.1.1" - }, - "dependencies": { - "semver": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.1.1.tgz", - "integrity": "sha512-rWYq2e5iYW+fFe/oPPtYJxYgjBm8sC4rmoGdUOgBB7VnwKt6HrL793l2voH1UlsyYZpJ4g0wfjnTEO1s1NP2eQ==" - } - } - }, - "core-js-pure": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.1.4.tgz", - "integrity": "sha512-uJ4Z7iPNwiu1foygbcZYJsJs1jiXrTTCvxfLDXNhI/I+NHbSIEyr548y4fcsCEyWY0XgfAG/qqaunJ1SThHenA==" - }, - "cosmiconfig": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", - "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", - "requires": { - "import-fresh": "^2.0.0", - "is-directory": "^0.3.1", - "js-yaml": "^3.13.1", - "parse-json": "^4.0.0" - } - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "requires": { - "ms": "^2.1.1" - } - }, - "electron-to-chromium": { - "version": "1.3.164", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.164.tgz", - "integrity": "sha512-VLlalqUeduN4+fayVtRZvGP2Hl1WrRxlwzh2XVVMJym3IFrQUS29BFQ1GP/BxOJXJI1OFCrJ5BnFEsAe8NHtOg==" - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" - }, - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" - }, - "import-fresh": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", - "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", - "requires": { - "caller-path": "^2.0.0", - "resolve-from": "^3.0.0" - } - }, - "invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "requires": { - "loose-envify": "^1.0.0" - } - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" - }, - "is-directory": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", - "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=" - }, - "js-levenshtein": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", - "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==" - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" - }, - "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==" - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" - }, - "lodash": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "node-releases": { - "version": "1.1.23", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.23.tgz", - "integrity": "sha512-uq1iL79YjfYC0WXoHbC/z28q/9pOl8kSHaXdWmAAc8No+bDwqkZbzIJz55g/MUsPgSGm9LZ7QSUbzTcH5tz47w==", - "requires": { - "semver": "^5.3.0" - } - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" - }, - "private": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", - "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==" - }, - "regenerate": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", - "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==" - }, - "regenerate-unicode-properties": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.1.0.tgz", - "integrity": "sha512-LGZzkgtLY79GeXLm8Dp0BVLdQlWICzBnJz/ipWUgo59qBaZ+BHtq51P2q1uVZlppMuUAT37SDk39qUbjTWB7bA==", - "requires": { - "regenerate": "^1.4.0" - } - }, - "regenerator-runtime": { - "version": "0.13.2", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz", - "integrity": "sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==" - }, - "regenerator-transform": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.0.tgz", - "integrity": "sha512-rtOelq4Cawlbmq9xuMR5gdFmv7ku/sFoB7sRiywx7aq53bc52b4j6zvH7Te1Vt/X2YveDKnCGUbioieU7FEL3w==", - "requires": { - "private": "^0.1.6" - } - }, - "regexp-tree": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.10.tgz", - "integrity": "sha512-K1qVSbcedffwuIslMwpe6vGlj+ZXRnGkvjAtFHfDZZZuEdA/h0dxljAPu9vhUo6Rrx2U2AwJ+nSQ6hK+lrP5MQ==" - }, - "regexpu-core": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.5.4.tgz", - "integrity": "sha512-BtizvGtFQKGPUcTy56o3nk1bGRp4SZOTYrDtGNlqCQufptV5IkkLN6Emw+yunAJjzf+C9FQFtvq7IoA3+oMYHQ==", - "requires": { - "regenerate": "^1.4.0", - "regenerate-unicode-properties": "^8.0.2", - "regjsgen": "^0.5.0", - "regjsparser": "^0.6.0", - "unicode-match-property-ecmascript": "^1.0.4", - "unicode-match-property-value-ecmascript": "^1.1.0" - } - }, - "regjsgen": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.0.tgz", - "integrity": "sha512-RnIrLhrXCX5ow/E5/Mh2O4e/oa1/jW0eaBKTSy3LaCj+M3Bqvm97GWDp2yUtzIs4LEn65zR2yiYGFqb2ApnzDA==" - }, - "regjsparser": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.0.tgz", - "integrity": "sha512-RQ7YyokLiQBomUJuUG8iGVvkgOLxwyZM8k6d3q5SAXpg4r5TZJZigKFvC6PpD+qQ98bCDC5YelPeA3EucDoNeQ==", - "requires": { - "jsesc": "~0.5.0" - }, - "dependencies": { - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=" - } - } - }, - "resolve": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz", - "integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==", - "requires": { - "path-parse": "^1.0.6" - } - }, - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=" - }, - "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==" - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "requires": { - "has-flag": "^3.0.0" - } - }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=" - }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" - }, - "unicode-canonical-property-names-ecmascript": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", - "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==" - }, - "unicode-match-property-ecmascript": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", - "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", - "requires": { - "unicode-canonical-property-names-ecmascript": "^1.0.4", - "unicode-property-aliases-ecmascript": "^1.0.4" - } - }, - "unicode-match-property-value-ecmascript": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.1.0.tgz", - "integrity": "sha512-hDTHvaBk3RmFzvSl0UVrUmC3PuW9wKVnpoUDYH0JDkSIovzw+J5viQmeYHxVSBptubnr7PbH2e0fnpDRQnQl5g==" - }, - "unicode-property-aliases-ecmascript": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.5.tgz", - "integrity": "sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw==" - } - } -} diff --git a/gatsby-plugin-material-ui/src/__tests__/gatsby-browser.test.js b/gatsby-plugin-material-ui/src/__tests__/gatsby-browser.test.js index 9021fac..212c8c7 100644 --- a/gatsby-plugin-material-ui/src/__tests__/gatsby-browser.test.js +++ b/gatsby-plugin-material-ui/src/__tests__/gatsby-browser.test.js @@ -1,14 +1,6 @@ -import { onInitialClientRender } from '../gatsby-browser'; +import { onInitialClientRender } from "../gatsby-browser"; -jest.mock( - `../.cache/styles-provider-props`, - () => { - return { - injectFirst: true, - }; - }, - { virtual: true }, -); +jest.mock(`../.cache/styles-provider-props`, () => null, { virtual: true }); describe(`onInitialClientRender`, () => { afterAll(() => { diff --git a/gatsby-plugin-material-ui/src/gatsby-browser.js b/gatsby-plugin-material-ui/src/gatsby-browser.js index 7b14e5d..5a78cfc 100644 --- a/gatsby-plugin-material-ui/src/gatsby-browser.js +++ b/gatsby-plugin-material-ui/src/gatsby-browser.js @@ -1,6 +1,6 @@ -import React from 'react'; -import { StylesProvider } from '@material-ui/styles'; -import stylesProviderProps from './.cache/styles-provider-props'; +import React from "react"; +import { StylesProvider } from "@material-ui/styles"; +import stylesProviderProps from "./.cache/styles-provider-props"; export const onInitialClientRender = () => { if (process.env.BUILD_STAGE === `develop`) { @@ -14,10 +14,18 @@ export const onInitialClientRender = () => { } }; -// Pass through all StylesProvider props export const wrapRootElement = ({ element }, pluginOptions) => { - if (pluginOptions.stylesProvider || pluginOptions.pathToStylesProvider) { - return {element}; + const stylesProvider = stylesProviderProps || pluginOptions.stylesProvider; + + if (!stylesProvider) { + return element; + } + + if (stylesProviderProps && pluginOptions.stylesProvider) { + throw new Error( + `You specified both pathToStylesProvider and stylesProvider in gatsby-config.js. Remove one of them.`, + ); } - return element; + + return {element}; }; diff --git a/gatsby-plugin-material-ui/src/gatsby-node.js b/gatsby-plugin-material-ui/src/gatsby-node.js index ba1d223..c56f00b 100644 --- a/gatsby-plugin-material-ui/src/gatsby-node.js +++ b/gatsby-plugin-material-ui/src/gatsby-node.js @@ -1,67 +1,31 @@ -import fs from 'fs'; -import path from 'path'; -import os from 'os'; +const fs = require(`fs`); +const path = require(`path`); +const os = require(`os`); -// Write out the gatsby-mui-config module to .cache. -// Happens before webpack starts compiling page. -// .cache is available when gatsby-browser.js and gatsby-ssr.js runs. +// Copy and past from https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-typography -export const onPreBootstrap = ({ store }, pluginOptions) => { - const { program } = store.getState(); - - const fixPath = module => { - let newModule = module; - if (os.platform() === `win32`) { - newModule = module.split(`\\`).join(`\\\\`); - } - return newModule; - }; +exports.onPreBootstrap = ({ store }, pluginOptions) => { + const program = store.getState().program; let module; - - // Not allowed to specify both pathToStylesProvider and StylesProvider props - // in gatsby-config.js - try { - if (pluginOptions.pathToStylesProvider && pluginOptions.stylesProvider) { - throw new Error( - `You specified both pathToStylesProvider and stylesProvider in gatsby-config.js. Only one should be specified...`, - ); - } - - if (pluginOptions.stylesProvider) { - module = `const stylesProviderProps = ${JSON.stringify( - pluginOptions.stylesProvider, - )}; - -export default stylesProviderProps; -`; - } else if (pluginOptions.pathToStylesProvider) { - module = `import stylesProviderProps from "${ - path.isAbsolute(pluginOptions.pathToStylesProvider) - ? pluginOptions.pathToStylesProvider - : path.join(program.directory, pluginOptions.pathToStylesProvider) - }"; -export default stylesProviderProps; -`; - - module = fixPath(module); - } else { - module = `const stylesProviderProps = { -injectFirst: true, -}; - -export default stylesProviderProps; -`; + if (pluginOptions.pathToStylesProvider) { + module = `module.exports = require("${ + path.isAbsolute(pluginOptions.pathToStylesProvider) + ? pluginOptions.pathToStylesProvider + : path.join(program.directory, pluginOptions.pathToStylesProvider) + }")`; + if (os.platform() === `win32`) { + module = module.split(`\\`).join(`\\\\`); } + } else { + module = null; + } - const dir = `${__dirname}/.cache`; - - if (!fs.existsSync(dir)) { - fs.mkdirSync(dir); - } + const dir = `${__dirname}/.cache`; - fs.writeFileSync(`${dir}/styles-provider-props.js`, module); - } catch (e) { - console.error(e.name + `: ` + e.message); + if (!fs.existsSync(dir)) { + fs.mkdirSync(dir); } + + fs.writeFileSync(`${dir}/styles-provider-props.js`, module); }; diff --git a/gatsby-plugin-material-ui/src/gatsby-ssr.js b/gatsby-plugin-material-ui/src/gatsby-ssr.js index 9d84f54..93f7ff2 100644 --- a/gatsby-plugin-material-ui/src/gatsby-ssr.js +++ b/gatsby-plugin-material-ui/src/gatsby-ssr.js @@ -1,23 +1,25 @@ -import React from 'react'; -import { ServerStyleSheets } from '@material-ui/styles'; -import postcss from 'postcss'; -import autoprefixer from 'autoprefixer'; -import CleanCSS from 'clean-css'; -import stylesProviderProps from './.cache/styles-provider-props'; +import React from "react"; +import { ServerStyleSheets } from "@material-ui/styles"; +import postcss from "postcss"; +import autoprefixer from "autoprefixer"; +import CleanCSS from "clean-css"; +import stylesProviderProps from "./.cache/styles-provider-props"; // Keep track of sheets for each page const globalLeak = new Map(); - const prefixer = postcss([autoprefixer]); const cleanCSS = new CleanCSS(); -const defaultOptions = { - disableAutoprefixing: false, - disableMinification: false, -}; - export const wrapRootElement = ({ element, pathname }, pluginOptions) => { - const sheets = new ServerStyleSheets(stylesProviderProps); + const stylesProvider = stylesProviderProps || pluginOptions.stylesProvider; + + if (stylesProviderProps && pluginOptions.stylesProvider) { + throw new Error( + `You specified both pathToStylesProvider and stylesProvider in gatsby-config.js. Remove one of them.`, + ); + } + + const sheets = new ServerStyleSheets(stylesProvider); globalLeak.set(pathname, sheets); return sheets.collect(element); @@ -29,27 +31,29 @@ export const onRenderBody = ( ) => { const sheets = globalLeak.get(pathname); - if (sheets) { - const { disableAutoprefixing, disableMinification } = { - ...defaultOptions, - ...pluginOptions, - }; + if (!sheets) { + return; + } + + const { + disableAutoprefixing = false, + disableMinification = false, + } = pluginOptions; - let css = sheets.toString(); + let css = sheets.toString(); - css = disableAutoprefixing - ? css - : prefixer.process(css, { from: undefined }).css; - css = disableMinification ? css : cleanCSS.minify(css).styles; + css = disableAutoprefixing + ? css + : prefixer.process(css, { from: undefined }).css; + css = disableMinification ? css : cleanCSS.minify(css).styles; - setHeadComponents([ -