1.0.5 • Published 10 months ago
daywon-storybook v1.0.5
daywon-ui-storybook
Instructions for Raising a Pull Request (PR)
When you create a story for any component, please adhere to the following steps:
Default Exports:
- Ensure that all components have default exports.
Update
src/index.ts
:- Add your component to the
src/index.ts
file and export it as shown below:export { default as Checkbox } from './components/Checkboxes/Checkbox';
- Add your component to the
- Don't forget to run build:
- Open a terminal and run:
yarn build
- This ensures that the code adheres to coding standards and does not introduce any breaking changes.
- Open a terminal and run:
Instructions for Publishing Components to the daywon-storybook
Library on npm
Publishing Permissions
- Only the manager of the master branch is authorized to publish to npm, as it requires npm account credentials.
Steps to Publish
After merging your code into the main branch, follow these steps:
Log in to npm:
- Open a terminal and run:
npm login
- Enter your npm username and password when prompted.
- Open a terminal and run:
Update the Package Version:
- Run the following command to update the version of your npm package:
npm version <major | minor | patch>
- For example, if your current version is
^1.0.2
,1
is the major version,0
is the minor version, and2
is the patch version.
- Run the following command to update the version of your npm package:
Publish the Package:
- Finally, publish the package by running:
npm publish
- Finally, publish the package by running:
Confirmation
If everything works correctly, your package will be published to npm with the new version.
You generally only need to run these commands to publish:
npm login
npm version patch
npm publish
Reverting Published Versions:
npm unpublish --force
- Be cautious with this, as npm only allows unpublishing within 72 hours of publishing, and it should be used sparingly.