Vue3, SCSS, Storybook, Typescript, Vite
https://main--625fa762a035be003a9814c1.chromatic.com/
yarn install
yarn build:lib
yarn storybook
yarn build-storybook
yarn dev
As Component
import { Header } from 'astar-ui';
...
components:{
Header
}
As Plugin
import astarUI from 'astar-ui';
...
app.use(astarUI)
then use like
<astar-button @click="click" />
<astar-simple-modal>Test</astar-simple-modal>
[DirectoryName]
> src
>> [Component.vue]
> index.ts (need to register as plugin, keep following the rule of component name :: app.component('astar-[component-name]', ComponentName) )
stories
> [DirectoryName]
>> [Component].stories.js
refer to: https://storybook.js.org/docs/vue/writing-stories/introduction
yarn storybook
Hot reloading support
Once it merged to main
, it automatically deploy & publish to npm with new version in github action workflow and deployed storybook as well.
there's no need to update version manually or build library & storybook before sending PR.
https://main--625fa762a035be003a9814c1.chromatic.com/
Update latest ui library(astar-ui) version then use like
<astar-button @click="click" />
<astar-simple-modal>Test</astar-simple-modal>