my-spellbook

0.0.12 • Public • Published

spellbook

to work with spellbook, your storybook must be work on vite

how to integrate with storybook

add in .storybook/main.js

  stories: [
  	"../node_modules/my-spellbook/src/spells-core/spell-storybook/*.stories.@(js|jsx|mjs|ts|tsx)"
  	],

add in .storybook/preview.js

import { setup } from '@storybook/vue3'
import { compile, h } from 'vue'
import spell from 'my-spellbook/src/spells-core/spell.js'

setup((app) => {
  app.use({
    install: function (vueApp, options) {
      vueApp.component(
        'Spell',
        spell({
          compile,
          h,
          components: {
            // add your components to this
          },
          ctxExt: {}
        })
      )
    }
  })
})

Readme

Keywords

none

Package Sidebar

Install

npm i my-spellbook

Weekly Downloads

250

Version

0.0.12

License

none

Unpacked Size

89.7 kB

Total Files

50

Last publish

Collaborators

  • petrilaptev