Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/koheimizuno/react-npm-package-boilerplate


https://github.com/koheimizuno/react-npm-package-boilerplate

chai css-loader enzyme node-sass prop-types react react-hot-loader react-test-renderer regenerator-runtime sass-loader style-loader

Last synced: 21 days ago
JSON representation

Awesome Lists containing this project

README

        

# React NPM Package Boilerplate

Boilerplate code for publishing a React NPM package.

* Bundled with [Webpack](https://webpack.js.org/)
* Develop with Hot Module Replacement [(HMR)](https://webpack.js.org/concepts/hot-module-replacement/)
* Includes linting with [ESLint](http://eslint.org/)
* Testing with [Jest](http://facebook.github.io/jest/).

## Usage

1. Install modules - `yarn`

2. Start example and start coding - `yarn start`

3. Run tests - `yarn test`

4. Bundle with - `yarn build`

5. To test if it works correctly in another project you can use npm `npm install -S ../react-npm-component-boilerplate` Note the relative path

E.g. this folder structure

```
./workspace/
MyProject
react-npm-boilerplate
```

## Extra

Adjust your `.eslintrc` config file to your own preference.

## NPM equivalent

yarn | npm
---- | ---
`yarn` | `npm install`
`yarn test` | `npm run test`
`yarn build` | `npm run build`

## License

MIT © Dinesh Pandiyan