- Clone the repo.
- Initialize new git repo (rm -rf .git and git init)
- 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.
- Go to root directory and execute
npm link
. - Go to test project and execute
npm link [package name]
. - Now you can import your package as anything else like
import MyComponent from "my-test-package";
. - Go back to your package and start development in watch-mode by
npm run dev
- 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.