Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
Merge pull request #107 from readmeio/feature/ie11-new
Browse files Browse the repository at this point in the history
Feature/ie11 new
  • Loading branch information
domharrington authored Mar 7, 2018
2 parents 6ef994f + 48cd8c1 commit 0d03643
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 12 deletions.
3 changes: 0 additions & 3 deletions example/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// We require the babel polyfill because the swagger2openapi module uses generators
require('babel-polyfill');

const React = require('react');
const ReactDOM = require('react-dom');
const { AppContainer } = require('react-hot-loader');
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"react": "^16.2.0",
"react-dom": "^16.2.0",
"react-hot-loader": "^3.1.3",
"swagger2openapi": "^2.9.2"
"swagger2openapi": "^2.9.2",
"whatwg-fetch": "^2.0.3"
}
}
3 changes: 2 additions & 1 deletion packages/api-explorer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"prop-types": "^15.5.10",
"react": "^16.2.0",
"react-jsonschema-form": "^1.0.0",
"react-waypoint": "^7.3.1"
"react-waypoint": "^7.3.1",
"whatwg-fetch": "^2.0.3"
},
"scripts": {
"lint": "eslint -f unix . --ext js --ext jsx",
Expand Down
3 changes: 2 additions & 1 deletion packages/api-explorer/src/AuthBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,14 @@ AuthBox.propTypes = {
needsAuth: PropTypes.bool,
open: PropTypes.bool,
oauth: PropTypes.bool.isRequired,
apiKey: PropTypes.string.isRequired,
apiKey: PropTypes.string,
};

AuthBox.defaultProps = {
needsAuth: false,
open: false,
authInputRef: () => {},
apiKey: '',
};

module.exports = AuthBox;
3 changes: 2 additions & 1 deletion packages/api-explorer/src/Doc.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -319,12 +319,13 @@ Doc.propTypes = {
language: PropTypes.string.isRequired,
oauth: PropTypes.bool.isRequired,
suggestedEdits: PropTypes.bool.isRequired,
apiKey: PropTypes.string.isRequired,
apiKey: PropTypes.string,
};

Doc.defaultProps = {
oas: {},
flags: {
stripe: false,
},
apiKey: '',
};
3 changes: 2 additions & 1 deletion packages/api-explorer/src/PathUrl.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,13 @@ PathUrl.propTypes = {
showAuthBox: PropTypes.bool,
needsAuth: PropTypes.bool,
oauth: PropTypes.bool.isRequired,
apiKey: PropTypes.string.isRequired,
apiKey: PropTypes.string,
};

PathUrl.defaultProps = {
showAuthBox: false,
needsAuth: false,
authInputRef: () => {},
apiKey: '',
};
module.exports = PathUrl;
4 changes: 2 additions & 2 deletions packages/api-explorer/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module.exports = {
entry: './src/index.jsx',
entry: ['whatwg-fetch', './src/index.jsx'],
module: {
rules: [
{
test: /\.js(x?)$/,
exclude: /node_modules/,
exclude: /node_modules\/(?!(@readme\/syntax-highlighter|fetch-har))/,
use: {
loader: 'babel-loader',
},
Expand Down
10 changes: 8 additions & 2 deletions webpack.common.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
module.exports = {
entry: ['react-hot-loader/patch', './example/index.jsx'],
entry: [
// We require the babel polyfill because the swagger2openapi module uses generators
'babel-polyfill',
'react-hot-loader/patch',
'whatwg-fetch',
'./example/index.jsx',
],
module: {
rules: [
{
test: /\.js(x?)$/,
exclude: /node_modules/,
exclude: /node_modules\/(?!(@readme\/syntax-highlighter|swagger2openapi|fetch-har))/,
use: {
loader: 'babel-loader',
},
Expand Down

0 comments on commit 0d03643

Please sign in to comment.