@opuscapita/dashboard-widgets
v1.4.1
Published
Dashboard widgets components library.
Downloads
46
Maintainers
Keywords
Readme
Development
Run library locally:
Make sure you use node 14 (node -v to check)
- Run
npm install
to install dependencies - Run
npm run dev
to start the development server - 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 test
to run the tests - Run
npm run test:ui
to run UI for the tests
Linting
- Run
npm run lint
to run the linter - Run
npm run lint:fix
to 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:dry
to report what would have done, if you publish the package - Run
npm pack
to 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 release
to 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 test
to 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
Publishing
instruction above