From 61d8d094eec88087f284e637fcb26b055eb9559a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matija=20Marohni=C4=87?= Date: Thu, 14 Mar 2019 10:47:25 +0100 Subject: [PATCH] chore: fix Gatsby build (#465) * Prevent publishing the docs as a package * Use iframe element directly instead of innerHTML * Bump all dependencies in docs - get out of Gatsby beta - use official Gatsby Babel preset instead of our library's to prevent build failure - upgrade to latest React Bootstrap - bump other inconsequential dependencies --- www/.babelrc.js | 6 +- www/package.json | 30 +- www/src/components/Example.js | 28 +- www/src/components/Layout.js | 94 +- www/src/css/bootstrap.scss | 4 - www/src/pages/index.js | 9 +- www/src/pages/with-react-router.js | 23 +- www/src/templates/component.js | 10 +- www/yarn.lock | 6837 +++++++++++++++------------- 9 files changed, 3814 insertions(+), 3227 deletions(-) diff --git a/www/.babelrc.js b/www/.babelrc.js index d7ccfcd3..466612ce 100644 --- a/www/.babelrc.js +++ b/www/.babelrc.js @@ -1 +1,5 @@ -module.exports = require('../.babelrc'); +module.exports = { + presets: [ + 'babel-preset-gatsby', + ], +}; diff --git a/www/package.json b/www/package.json index 66b558d1..0547cd86 100644 --- a/www/package.json +++ b/www/package.json @@ -1,4 +1,5 @@ { + "private": true, "name": "react-transition-group-docs", "version": "1.0.0", "description": "", @@ -12,20 +13,23 @@ "author": "", "license": "MIT", "dependencies": { - "bootstrap": "^3.3.7", - "gatsby": "^2.0.0-beta.12", - "gatsby-plugin-sass": "^2.0.0-beta.3", - "gatsby-remark-prismjs": "^1.0.0", - "gatsby-source-filesystem": "^2.0.1-beta.3", - "gatsby-transformer-react-docgen": "^2.1.1-beta.3", - "gatsby-transformer-remark": "^1.0.0", - "lodash": "^4.17.4", - "react": "^16.4.1", - "react-bootstrap": "^0.32.1", - "react-dom": "^16.4.1" + "@babel/core": "^7.3.4", + "babel-preset-gatsby": "^0.1.8", + "bootstrap": "^4.3.1", + "gatsby": "^2.1.22", + "gatsby-plugin-sass": "^2.0.10", + "gatsby-remark-prismjs": "^3.2.4", + "gatsby-source-filesystem": "^2.0.23", + "gatsby-transformer-react-docgen": "^3.0.5", + "gatsby-transformer-remark": "^2.3.0", + "lodash": "^4.17.11", + "prismjs": "^1.15.0", + "react": "^16.8.3", + "react-bootstrap": "^1.0.0-beta.5", + "react-dom": "^16.8.3" }, "devDependencies": { - "gh-pages": "^1.0.0", - "node-sass": "^4.9.0" + "gh-pages": "^2.0.1", + "node-sass": "^4.11.0" } } diff --git a/www/src/components/Example.js b/www/src/components/Example.js index 9ba0d7a5..a8380da2 100644 --- a/www/src/components/Example.js +++ b/www/src/components/Example.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { Grid } from 'react-bootstrap'; +import { Container } from 'react-bootstrap'; const propTypes = { codeSandbox: PropTypes.shape({ @@ -10,20 +10,22 @@ const propTypes = { }; const Example = ({ codeSandbox }) => ( -
- +
+

Example

- -
`, + +