my-spellbook

0.0.19 • Public • Published

spellbook

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

how to integrate with storybook 8.0.0

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: {}
        })
      )
    }
  })
})

add in package.json

"build": "npm run build-storybook && node node_modules/my-spellbook/src/spells-core/build-postprocessing.js",

Dependencies (6)

Dev Dependencies (20)

Package Sidebar

Install

npm i my-spellbook

Weekly Downloads

217

Version

0.0.19

License

none

Unpacked Size

98.3 kB

Total Files

57

Last publish

Collaborators

  • petrilaptev