A sample opinionated template to build npm packages. Uses below technologies to test and build the package.
- Reactjs
- Babel
- Rollup
First, setup a CRA to use the code as package.
npx create-react-app example
In package.json, add the package name as a dependencies. "react-lib-template": "file:..",
Note: replace react-lib-template
with the name present in package.json in root dir.
Now run npm start
script from root dir and from example/ dir.
The template has two actions already setup. Replace react-lib-template accordingly.
- Test: to run the test script.
- Build: to test, lint and build the package