Skip to content

Commit

Permalink
chore: add storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
novellac committed Mar 6, 2023
1 parent 9aae0d7 commit c9bc9ef
Show file tree
Hide file tree
Showing 6 changed files with 11,759 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')

module.exports = {
root: true,
extends: [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/eslint-config-prettier',
'plugin:storybook/recommended',
],
parserOptions: {
ecmaVersion: 'latest',
Expand Down
18 changes: 18 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
"stories": [
"../src/**/*.stories.mdx",
"../src/**/*.stories.@(js|jsx|ts|tsx)"
],
"addons": [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions"
],
"framework": "@storybook/vue3",
"core": {
"builder": "@storybook/builder-vite"
},
"features": {
"storyStoreV7": true
}
}
3 changes: 3 additions & 0 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<script>
window.global = window;
</script>
9 changes: 9 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
}
17 changes: 15 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,37 @@
"build": "vite build",
"preview": "vite preview",
"test:unit": "vitest --environment jsdom --root src/",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore"
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook"
},
"dependencies": {
"vue": "^3.2.45"
},
"devDependencies": {
"@babel/core": "^7.21.0",
"@rushstack/eslint-patch": "^1.1.4",
"@storybook/addon-actions": "^6.5.16",
"@storybook/addon-essentials": "^6.5.16",
"@storybook/addon-interactions": "^6.5.16",
"@storybook/addon-links": "^6.5.16",
"@storybook/builder-vite": "^0.4.2",
"@storybook/testing-library": "^0.0.13",
"@storybook/vue3": "^6.5.16",
"@vitejs/plugin-vue": "^4.0.0",
"@vue/eslint-config-prettier": "^7.0.0",
"@vue/test-utils": "^2.2.6",
"autoprefixer": "^10.4.13",
"babel-loader": "^8.3.0",
"eslint": "^8.22.0",
"eslint-plugin-storybook": "^0.6.11",
"eslint-plugin-vue": "^9.3.0",
"jsdom": "^20.0.3",
"postcss": "^8.4.21",
"prettier": "^2.7.1",
"tailwindcss": "^3.2.7",
"vite": "^4.0.0",
"vitest": "^0.25.6"
"vitest": "^0.25.6",
"vue-loader": "^16.8.3"
}
}
Loading

0 comments on commit c9bc9ef

Please sign in to comment.