Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 907 Bytes

README.md

File metadata and controls

17 lines (13 loc) · 907 Bytes

react-package-rollup - boilerplate for React package bundled with Rollup

  1. Clone the repo.
  2. Initialize new git repo (rm -rf .git and git init)
  3. Change name, author, keywords, repository, and description in package.json file.

While development it is recommended to make sym-link of this package and use it in test project.

  1. Go to root directory and execute npm link.
  2. Go to test project and execute npm link [package name].
  3. Now you can import your package as anything else like import MyComponent from "my-test-package";.
  4. Go back to your package and start development in watch-mode by npm run dev
  5. Now everything you change in src will be automatically transpiled by Rollup to es5 and exported to lib/index.js file. Changes will also be reflected in your test project without needing to reinstall packages every time something has changed.

Good luck.