https://github.com/cristianoliveira/react-lib-boilerplate
A boilerplate for creating react components as distributed node packages.
https://github.com/cristianoliveira/react-lib-boilerplate
Last synced: 7 months ago
JSON representation
A boilerplate for creating react components as distributed node packages.
- Host: GitHub
- URL: https://github.com/cristianoliveira/react-lib-boilerplate
- Owner: cristianoliveira
- License: mit
- Created: 2017-07-22T07:42:36.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-22T08:09:53.000Z (about 8 years ago)
- Last Synced: 2025-01-17T18:00:43.653Z (9 months ago)
- Language: CSS
- Size: 121 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# React Boilerplate to create libraries
This project contains all react components needed for your development. You can
build and distribute as npm package.## Installing
To start using it just add this project as dependeny:
```bash
// packages.json
"dependencies": {
"mylib-react-ui": "git@github.com:cristianoliveira/react-lib-boilerplate.git"
}
```## Basic theme usage
To have all elements in the correct style you must wrap your app with the `MyLibTheme` component.
```javascript
// App.js
import MyLibTheme from 'mylib-react-ui';const App = () => (
);ReactDOM.render(, document.getElementById('app'));
```Using the components
```javascript
// FooButton.jsimport { Button } from 'mylib-react-ui';
const FooButton = () => {
Click
}export default FooButton;
```## Live style guide and documentation
This project also has a live style guide and usage documentation :).
To install and run the Styleguidist server do:```
npm install
npm run styleguide
```Then open [http://localhost:6060](http://localhost:6060) in your browser. There you going to find all
components and examples of use.## Tests
To run all tests execute:
```
npm run test
```# Dependencies
This project includes:
- Reactjs
- Babel
- Webpack 3.0
- Postcss
- Jest
- Eslint
- Styledist