Skip to content

Commit

Permalink
Fix globals and peerDependencies issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmckeb committed Sep 8, 2018
1 parent 3c1ad8b commit 1e2b5d4
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 7 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-outline-manager",
"version": "1.0.0",
"version": "1.0.1",
"description": "A simple helper for toggling CSS outlines.",
"keywords": [
"a11y",
Expand Down Expand Up @@ -40,7 +40,7 @@
"dist"
],
"peerDependencies": {
"react": "^16.5.0"
"react": ">=15.0.0"
},
"devDependencies": {
"@babel/cli": "^7.0.0",
Expand All @@ -55,6 +55,7 @@
"react-dom": "^16.5.0",
"rollup": "^0.65.2",
"rollup-plugin-babel": "^4.0.3",
"rollup-plugin-node-resolve": "^3.4.0",
"rollup-plugin-replace": "^2.0.0",
"rollup-plugin-uglify": "^5.0.2",
"serve": "^10.0.0",
Expand Down
4 changes: 3 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import babel from 'rollup-plugin-babel';
import replace from 'rollup-plugin-replace';
import resolve from 'rollup-plugin-node-resolve';
import packageJson from './package.json';

const isDevEnv = process.env.ROLLUP_WATCH;
Expand All @@ -19,7 +20,7 @@ const productionOutputs = [
name: 'ReactOutlineHander',
globals: {
react: 'React',
},
}
},
];

Expand All @@ -37,6 +38,7 @@ export default {
: productionOutputs,
external: ['react'],
plugins: [
resolve(),
babel({
babelrc: false,
extensions: ['.ts', '.tsx', '.js', '.jsx'],
Expand Down
4 changes: 2 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component } from 'react';
import * as React from 'react';

interface Props {
children: JSX.Element,
Expand All @@ -8,7 +8,7 @@ interface Props {

const DEFAULT_CLASSNAME = 'ReactOutlineHandler';

export default class ReactOutlineHander extends Component<Props, {}> {
export default class ReactOutlineHander extends React.Component<Props, {}> {

state = {
isUsingKeyboard: false,
Expand Down
28 changes: 26 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1076,6 +1076,10 @@ builtin-modules@^1.0.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"

builtin-modules@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-2.0.0.tgz#60b7ef5ae6546bd7deefa74b08b62a43a232648e"

[email protected]:
version "3.0.0"
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048"
Expand Down Expand Up @@ -2069,6 +2073,10 @@ is-glob@^4.0.0:
dependencies:
is-extglob "^2.1.1"

is-module@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591"

is-number@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f"
Expand Down Expand Up @@ -3464,7 +3472,7 @@ [email protected]:
version "1.1.7"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b"

resolve@^1.3.2:
resolve@^1.1.6, resolve@^1.3.2:
version "1.8.1"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26"
dependencies:
Expand All @@ -3487,6 +3495,14 @@ rollup-plugin-babel@^4.0.3:
"@babel/helper-module-imports" "^7.0.0"
rollup-pluginutils "^2.3.0"

rollup-plugin-node-resolve@^3.4.0:
version "3.4.0"
resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.4.0.tgz#908585eda12e393caac7498715a01e08606abc89"
dependencies:
builtin-modules "^2.0.0"
is-module "^1.0.0"
resolve "^1.1.6"

rollup-plugin-replace@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/rollup-plugin-replace/-/rollup-plugin-replace-2.0.0.tgz#19074089c8ed57184b8cc64e967a03d095119277"
Expand All @@ -3495,6 +3511,14 @@ rollup-plugin-replace@^2.0.0:
minimatch "^3.0.2"
rollup-pluginutils "^2.0.1"

rollup-plugin-uglify@^5.0.2:
version "5.0.2"
resolved "https://registry.yarnpkg.com/rollup-plugin-uglify/-/rollup-plugin-uglify-5.0.2.tgz#3d7985faa9760a933eb451fcfb7f54bf76c0651d"
dependencies:
"@babel/code-frame" "^7.0.0"
jest-worker "^23.2.0"
uglify-js "^3.4.8"

rollup-pluginutils@^2.0.1, rollup-pluginutils@^2.3.0:
version "2.3.1"
resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.3.1.tgz#760d185ccc237dedc12d7ae48c6bcd127b4892d0"
Expand Down Expand Up @@ -3944,7 +3968,7 @@ typescript@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.0.3.tgz#4853b3e275ecdaa27f78fda46dc273a7eb7fc1c8"

uglify-js@^3.1.4:
uglify-js@^3.1.4, uglify-js@^3.4.8:
version "3.4.9"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.9.tgz#af02f180c1207d76432e473ed24a28f4a782bae3"
dependencies:
Expand Down

0 comments on commit 1e2b5d4

Please sign in to comment.