https://github.com/zxqx/generator-react-lib
A react component generator with UMD build and browser testing infrastructure.
https://github.com/zxqx/generator-react-lib
component generator react umd
Last synced: 5 months ago
JSON representation
A react component generator with UMD build and browser testing infrastructure.
- Host: GitHub
- URL: https://github.com/zxqx/generator-react-lib
- Owner: zxqx
- Created: 2016-10-21T20:53:27.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-10-02T08:55:37.000Z (over 8 years ago)
- Last Synced: 2025-08-09T06:52:31.972Z (5 months ago)
- Topics: component, generator, react, umd
- Language: JavaScript
- Homepage:
- Size: 37.1 KB
- Stars: 5
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# generator-react-lib
A react component generator with UMD build and browser testing infrastructure.
[](https://circleci.com/gh/zakangelle/generator-react-lib/tree/master)

## Requirements
+ NodeJS
+ Yeoman
## Tech Stack
* [react](https://facebook.github.io/react/) - View layer
* [babel](https://babeljs.io/) - JS compiler
* [webpack](https://webpack.github.io/) - UMD bundler
* [jest](https://facebook.github.io/jest/) - Test suite
* [enzyme](https://github.com/airbnb/enzyme) - React testing utils
* [eslint](http://eslint.org/) - Style linter
## Setup
Install it globally:
```sh
$ npm install -g generator-react-lib
```
## Usage
Make a folder for your lib:
```sh
$ mkdir lib-name && cd lib-name
```
Generate the scaffolding:
```sh
$ yo react-lib
```
## Development
Run the example app at [http://localhost:8080](http://localhost:8080):
```
$ npm start
```
Run tests and watch for code changes using [jest](https://github.com/facebook/jest):
```
$ npm test
```
Lint `src` and `test` files:
```
$ npm run lint
```
Generate UMD output in the `lib` folder (runs implicitly on `npm version`):
```
$ npm run build
```
## License
MIT