Skip to content

Commit

Permalink
refactor: move storybook to the formkit package
Browse files Browse the repository at this point in the history
  • Loading branch information
raichev-dima committed Dec 27, 2024
1 parent d263946 commit bcb97d7
Show file tree
Hide file tree
Showing 49 changed files with 73 additions and 1,782 deletions.
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@
"sandbox:nuxt": "yarn workspace sandbox dev:nuxt",
"sandbox:vue-cli": "yarn workspace sandbox dev:vue-cli",
"sandbox:web-components": "yarn workspace sandbox dev:web-components",
"release": "yarn workspace deploy release"
"release": "yarn workspace deploy release",
"serve:formkit": "yarn workspace @vuestic/formkit serve:storybook",
"build:formkit": "yarn workspace @vuestic/formkit build:storybook",
"start:formkit": "yarn workspace @vuestic/formkit start:storybook"
},
"workspaces": {
"packages": [
Expand All @@ -56,6 +59,7 @@
"@vue/server-renderer": "3.5.12",
"@vue/compiler-dom": "3.5.12",
"sass": "1.52.0",
"typescript": "5.3.2",
"vue-tsc": "2.0.7"
}
}
8 changes: 8 additions & 0 deletions packages/formkit/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { type StorybookConfig } from '@storybook/vue3-vite'

const config: StorybookConfig = {
stories: ['../stories/*.stories.ts'],
framework: '@storybook/vue3-vite',
}

export default config
16 changes: 16 additions & 0 deletions packages/formkit/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { type Preview, setup } from '@storybook/vue3'
import { createVuestic } from 'vuestic-ui'
import { plugin as formkitPlugin, defaultConfig as formkitConfig } from '@formkit/vue'
import 'vuestic-ui/css'
import 'vuestic-ui/styles/essential.css'
import 'vuestic-ui/styles/typography.css'
import './vuestic.css'

setup((app) => {
app.use(createVuestic())
app.use(formkitPlugin, formkitConfig())
})

const preview: Preview = {}

export default preview
2 changes: 2 additions & 0 deletions packages/formkit/.storybook/vuestic.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@import url("https://fonts.googleapis.com/css2?family=Source+Sans+Pro:ital,wght@0,400;1,700&display=swap");
@import url("https://fonts.googleapis.com/icon?family=Material+Icons");
13 changes: 9 additions & 4 deletions packages/formkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@
"dist"
],
"scripts": {
"build": "rm -rf dist && tsup src/index.ts --format esm --dts",
"prepublishOnly": "npm run build"
"build": "tsup src/index.ts --format esm --dts",
"prepublishOnly": "npm run build",
"serve:storybook": "storybook dev -p 6007",
"build:storybook": "storybook build",
"start:storybook": "serve storybook-static"
},
"dependencies": {
"@formkit/core": "^1.6.9",
Expand All @@ -31,10 +34,12 @@
"@formkit/vue": "^1.6.9"
},
"peerDependencies": {
"vuestic-ui": "^1.10.3",
"vue": "^3.0.4"
"vue": "^3.0.4",
"vuestic-ui": "^1.10.3"
},
"devDependencies": {
"@storybook/vue3-vite": "^7.1.0",
"storybook": "^7.1.0",
"tsup": "^6.5.0"
}
}
24 changes: 0 additions & 24 deletions packages/formkit/playground/.gitignore

This file was deleted.

5 changes: 0 additions & 5 deletions packages/formkit/playground/README.md

This file was deleted.

14 changes: 0 additions & 14 deletions packages/formkit/playground/index.html

This file was deleted.

23 changes: 0 additions & 23 deletions packages/formkit/playground/package.json

This file was deleted.

1 change: 0 additions & 1 deletion packages/formkit/playground/public/vite.svg

This file was deleted.

75 changes: 0 additions & 75 deletions packages/formkit/playground/src/App.vue

This file was deleted.

1 change: 0 additions & 1 deletion packages/formkit/playground/src/assets/vue.svg

This file was deleted.

10 changes: 0 additions & 10 deletions packages/formkit/playground/src/main.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/formkit/playground/src/vite-env.d.ts

This file was deleted.

26 changes: 0 additions & 26 deletions packages/formkit/playground/tsconfig.app.json

This file was deleted.

7 changes: 0 additions & 7 deletions packages/formkit/playground/tsconfig.json

This file was deleted.

24 changes: 0 additions & 24 deletions packages/formkit/playground/tsconfig.node.json

This file was deleted.

8 changes: 0 additions & 8 deletions packages/formkit/playground/vite.config.ts

This file was deleted.

Loading

0 comments on commit bcb97d7

Please sign in to comment.