@webtretho/webtretho-storybook
v0.0.22
Published
This library is made by Webtretho Frontend Team
Readme
Webtretho Storybook
🔗 What is insided?
🧾 Prerequisites
- NodeJS (v16.0+)
- Docker (TBD)
- Docker Compose (TBD)
🛠 How to use
@storybook/cli
npm install -g @storybook/cliInstall and Start
yarn && yarn storybook
# or npm install && npm run storybook 📌 Scripts
test: run all jest testsstorybook: Start and launch Storybook. Run storybook on6006portlint: Lints and fixes files. run the linter on all componentsbuild-storybook: Compiles and minifies for production. Create the build version of storybook
👏 Absolute paths
TypeScript
// anyComponent.tsx
import { Component } from 'packages/Component';
import sass from 'sass/*';SCSS
// component.module.scss
@import "sass/*";
@import "sass/config/colors";Read more
🕹 Usage
After publishing our lib (@webtretho/webtretho-storybook) you can import and use the component:
//
import React from 'react'
import { Button } from '@webtretho/webtretho-storybook'
const App = () => {
render() {
return <Button />
}
}🚀 How to publish the library to NPM
Checkout the latest version of the master branch
git checkout master
git pullUpdate the library version number
Can be "major", "minor", or "patch". Almost always use "patch", unless implementing significant changes.
npm version patchor the following for a prerelease:
npm version prerelease --preid=alphaPush the newly created version and tag
git push origin <BRANCH> --follow-tagsBuild the library
npm run buildAuthorize NPM
Add your username, password, email
npm adduserPublish the library
If this is a standard release of the current major version use:
npm publishIf this is an experimental release, use the "alpha" tag.
npm publish --tag alphaThis will ensure that the "latest" tag doesn't get updated.
