1.4.1 • Published 2 years ago
@opuscapita/dashboard-widgets v1.4.1
Development
Run library locally:
Make sure you use node 14 (node -v to check)
1. Run npm install to install dependencies
2. Run npm run dev to start the development server
3. In local/index.tsx there's a local playground for the library. Import the components you want to test and use them in the playground. Do not commit this file.
Run tests
Make sure you use node 14 (node -v to check)
- Run
npm run testto run the tests - Run
npm run test:uito run UI for the tests
Linting
- Run
npm run lintto run the linter - Run
npm run lint:fixto run the linter and fix errors - This library uses husky and lint-staged to run the linter on pre-commit
Run package in other project
- (Optionally) Run
npm run release:dryto report what would have done, if you publish the package - Run
npm packto create a tarball - Go to the project you want to test the package in and run
npm i -D <path to tarball>, e.g.:npm i -D '~/Desktop/dashboard-widgets/dashboard-widgets-0.0.1.tgz'
Publishing
- Make sure you are logged in to npm with the
npm whoami, and you are added to OpusCapita npm registry - Make sure your working directory is clean
- Run
npm run releaseto publish the package - Follow the steps in the terminal
Contributing
- Create a branch
feature/BNAPP-<ticket number>_<short description> - On the branch, make your changes
- Create tests and stories for each new component / use case if applicable
- Run
npm run testto make sure all tests pass - Commit those changes and create meaningful pull request
- After PR is approved, merge it to master
- Release the package to npm according to the
Publishinginstruction above