The package is based on npm-base package by Kadira which is really great when you want to prepare Npm package. This one is prepared to be used as a starter point for React components which needs to be published on Npm.
It includes:
- Linting with ESLint
- Testing with Jest and Enzyme
- Example with react-scripts
- Continues Integration with travis-ci
Also there is of course ES6 transpilation.
- Clone this repo
- Inside cloned repo run
npm install && rm -rf .git && git init
and updatepackage.json
with your package name. - If you want to run tests:
npm test
ornpm run test-watch
. You need to write tests in__tests__
folder. You need at least Node 4 on your machine to run tests. - If you want to run linting:
npm run lint
. Fix bugs:npm run lint-fix
. You can adjust your.eslintrc
config file. - If you want to run transpilation to ES5 in
dist
folder:npm run prepublish
(standard npm hook). - If you want see how your plugin work in real word react application. Run
npm run prepublish
then go to example folder runnpm install
and runnpm start
. - If you want to publish your package to npm just run
npm publish
.
MIT