Skip to content

Commit

Permalink
Made styled components a peer dependency (#14)
Browse files Browse the repository at this point in the history
* Made it a peer dependency and it works

* Improved readme getting started
  • Loading branch information
franciscop-sc authored Dec 10, 2020
1 parent 48c7b22 commit 8699063
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@standard/portal",
"version": "0.3.5",
"version": "0.3.7",
"description": "Easily add a login portal to any React app with Auth0",
"homepage": "https://github.com/standard-ai/portal#readme",
"bugs": "https://github.com/standard-ai/portal/issues",
Expand All @@ -19,12 +19,11 @@
"stats": "webpack -c --profile --json > webpack-stats.json",
"test": "jest"
},
"dependencies": {
"styled-components": "^5.2.0"
},
"dependencies": {},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0",
"react-dom": "^16.8.0 || ^17.0.0"
"react-dom": "^16.8.0 || ^17.0.0",
"styled-components": "^5.2.0"
},
"devDependencies": {
"@auth0/auth0-spa-js": "^1.13.0",
Expand All @@ -39,6 +38,7 @@
"react-dom": "^16.8.0 || ^17.0.0",
"react-test": "^0.7.3",
"regenerator-runtime": "^0.13.7",
"styled-components": "^5.2.0",
"use-async-effect": "^2.2.2",
"webpack": "^4.44.2",
"webpack-cli": "^3.1.2"
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ export default () => (

## Getting started

This is the _quick guide_ on how to get started. First install this library:
First install this library. You need to install `styled-components` as well if you don't have it yet:

```bash
npm i @standard/portal
npm i @standard/portal styled-components
```

Then provide the Auth0 config as environment variables:
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = {
}
},
externals: {
// Don't bundle react
// Don't bundle styled components
"styled-components": {
commonjs: "styled-components",
commonjs2: "styled-components",
Expand Down

0 comments on commit 8699063

Please sign in to comment.