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.htmland customizeexamples/index.jsto 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/libfolder -
npm publish- publish your package to npmjs.com. Remember to customizepackage.jsonto suit your custom module.
Build on top of: https://github.com/Travelport-Ukraine/npm-module-boilerplate