Skip to content

Commit

Permalink
Replace old HUI dependency with Hero UI peer
Browse files Browse the repository at this point in the history
Having projects with HUI and EDH Widgets alongside causes all sorts of problems where two incompatible versions of react get loaded alongside each other. After a review of EDH widgets, it's clear that the only thing HUI is using is importing three SCSS files as a source for colour and other variables.

Since these files also exist in the latest HUI, its safe to pin to that.

I've also moved the HUI, React, and ReactDOM dependencies to peer dependencies. This still allows us to specify version preferences, but won't install parallel incompatible versions in apps that use this alongside their own React installs.
  • Loading branch information
HowlingEverett committed Jun 18, 2020
1 parent 7494414 commit b9d6cd4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,13 @@
"classnames": "^2.2.4",
"es5-shim": "~4.5.5",
"highlight.js": "^9.2.0",
"hui": "git://github.com/everydayhero/hui#v1.1.23",
"jsonp": "webmodules/jsonp",
"lodash": "^4.5.1",
"moment": "^2.10.2",
"numbro": "^1.7.1",
"paths-js": "^0.4.3",
"react": "^15.5.4",
"react-addons-css-transition-group": "^15.5.2",
"react-addons-pure-render-mixin": "^15.5.2",
"react-dom": "^15.5.4",
"react-tween-state": "0.1.5",
"remarkable": "^1.6.0"
},
Expand All @@ -31,7 +28,7 @@
"babel-preset-es2015": "^6.3.13",
"babel-preset-react": "^6.3.13",
"babel-register": "^6.14.0",
"babelify": "^7.3.0",
"babelify": "^x7.3.0",
"browserify": "~13.0.0",
"chai": "^3.5.0",
"compression": "~1.6.1",
Expand Down Expand Up @@ -69,6 +66,11 @@
"watchify": "^3.4.0",
"wget": "~0.0.1"
},
"peerDependencies": {
"react": "^15.6.2",
"react-dom": "^15.6.2",
"hero-ui": "^5.8.10"
},
"repository": {
"type": "git",
"url": "git://github.com/everydayhero/react-widgets.git"
Expand Down
6 changes: 3 additions & 3 deletions src/widgets.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
@import "scss/mixins";
@import "scss/modules";

@import "node_modules/hui/sass/_colors.scss";
@import "node_modules/hui/sass/modules/_resets.scss";
@import "node_modules/hui/buttons/Button/style";
@import "node_modules/hero-ui/sass/_colors.scss";
@import "node_modules/hero-ui/sass/modules/_resets.scss";
@import "node_modules/hero-ui/buttons/Button/style";

@import "components/helpers/FlagIcon/style";
@import "components/helpers/Icon/style";
Expand Down

0 comments on commit b9d6cd4

Please sign in to comment.