Boilerplate code for publishing a React NPM package.
- Bundled with Webpack
- Develop with Hot Module Replacement (HMR)
- Includes linting with ESLint
- Testing with Jest.
-
Install modules -
yarn
-
Start example and start coding -
yarn start
-
Run tests -
yarn test
-
Bundle with -
yarn build
-
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
Adjust your .eslintrc
config file to your own preference.
yarn | npm |
---|---|
yarn |
npm install |
yarn test |
npm run test |
yarn build |
npm run build |
MIT © Dinesh Pandiyan