Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/franleplant/inline-react-package-example
This is an example of how to create an "inline-all" React package
https://github.com/franleplant/inline-react-package-example
Last synced: 30 days ago
JSON representation
This is an example of how to create an "inline-all" React package
- Host: GitHub
- URL: https://github.com/franleplant/inline-react-package-example
- Owner: franleplant
- Created: 2020-01-03T18:46:23.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T04:51:25.000Z (almost 2 years ago)
- Last Synced: 2024-08-04T01:25:03.875Z (4 months ago)
- Language: JavaScript
- Size: 721 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 36
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Example of a inline-react-package
To see `mylib` in action it please use two terminals
**Terminal 1**
```sh
cd mylib# Install dependencies
yarn# Link it so that the playground can consume it
yarn link# Build a fresh copy
yarn build# Or, Watch for changes and rebuild
yarn watch
```**Terminal 2**
```sh
cd playground# Install dependencies
yarn# use my-lib
yarn link my-lib# Build a fresh copy
yarn start
```Note
- This is rather rudimentary dev workflow, if you want to have a similar playground for components you should use something like Storybook. This is just to simulate a real world component usage.- For emotion theming to really work there needs to be a single copy of `@emotion/core` in your app, otherwise theme composition wont work (which is 50% of the reason for having a theme to begin with). Enforce this by having all `emotion` packages be peer dependencies of your libraries and a direct dependency of your app.