Boilerplate for developing ReactJS components using Babel ES6, Prettier, Lint.
git clone --depth=1 --branch=master https://github.com/lassegit/npm-react-module CustomReactModule && cd $_ && sudo rm -r .git/
Remove the .git
folder and rename the component in src/index.js
. Styles resides in src/style.css
.
-
npm run dev
- start webpack for module development. You can openexamples/index.html
and customizeexamples/index.js
to test your code. Webpack config resides inexamples/webpack.config.js
. -
npm run lint
- lint your code -
npm run prettier
- prettify your code in src/ -
npm run build
- build/lib
folder -
npm publish
- publish your package to npmjs.com. Remember to customizepackage.json
to suit your custom module.
Build on top of: https://github.com/Travelport-Ukraine/npm-module-boilerplate