Skip to content

Commit

Permalink
[dx] reinstall storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
Kreezag committed Jul 30, 2024
1 parent ce3e39e commit 7d36df7
Show file tree
Hide file tree
Showing 5 changed files with 542 additions and 36 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ dist
secrets.json
.ruby-version
*.orig

*storybook.log
21 changes: 18 additions & 3 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const fs = require("fs");
const path = require('path');
import fs from "node:fs";
import path from 'node:path';
import vue from '@vitejs/plugin-vue'
import {fileURLToPath} from "url";

//storybook-tailwind-dark-mode
const config = {
Expand All @@ -19,7 +21,7 @@ const config = {
],

framework: {
name: "@storybook-vue/nuxt",
name: "@storybook/vue3-vite",
options: {}
},

Expand All @@ -40,6 +42,19 @@ const config = {
STORYBOOK_ICON_SVG_NAMES: allIconNamesList,
}},

viteFinal: async (config) => {
config.resolve.alias = {
...config.resolve.alias,
'#app': fileURLToPath(new URL('../node_modules/nuxt/dist/app', import.meta.url)),
'#app/*': fileURLToPath(new URL('../node_modules/nuxt/dist/app/*', import.meta.url)),
}

const { mergeConfig } = await import('vite');

return mergeConfig(config, {
plugins: [vue()],
});
}
};

export default config;
12 changes: 10 additions & 2 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import vue from '@vitejs/plugin-vue'
import {defineNuxtConfig} from "nuxt/config";
import pkg from './package.json';

Expand Down Expand Up @@ -47,13 +48,16 @@ export default defineNuxtConfig({
modules: [
'@nuxtjs/tailwindcss',
'@pinia/nuxt',
'@nuxtjs/storybook'
],

typescript: {
strict: true,
},

build: {
transpile: ['@babel/plugin-syntax-import-attributes'],
},

devServer: {
host: '127.0.0.1',
url: 'http://127.0.0.1:3000',
Expand All @@ -65,5 +69,9 @@ export default defineNuxtConfig({
}
},

vite: {
plugins: [vue()]
},

compatibilityDate: "2024-07-12"
});
});
16 changes: 12 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
"lint": "yarn codestyle && yarn typecheck",
"codestyle": "eslint . --fix",
"typecheck": "tsc --noEmit",
"test": "echo \"TODO: need to add tests\""
"test": "echo \"TODO: need to add tests\"",
"storybook": "storybook dev -p 6006",
"sb": "storybook dev -p 6006",
"build-storybook": "storybook build"
},
"type": "module",
"lint-staged": {
"*.{js,ts}": [
"eslint --fix"
Expand All @@ -29,15 +31,20 @@
"*.{js,css,md}": "prettier --write"
},
"devDependencies": {
"@babel/plugin-syntax-import-attributes": "^7.24.7",
"@chromatic-com/storybook": "^1.6.1",
"@conarti/eslint-plugin-feature-sliced": "^1.0.5",
"@nuxtjs/eslint-config-typescript": "^12.0.0",
"@nuxtjs/storybook": "8.1.5",
"@nuxtjs/storybook": "^8.1.5",
"@nuxtjs/tailwindcss": "^6.2.0",
"@storybook-vue/nuxt": "0.2.10",
"@storybook/addon-essentials": "^8.1.11",
"@storybook/addon-interactions": "^8.1.11",
"@storybook/addon-links": "^8.1.11",
"@storybook/blocks": "8.1.11",
"@storybook/test": "8.1.11",
"@storybook/vue3": "^8.1.11",
"@storybook/vue3-vite": "8.1.11",
"@types/cytoscape-dagre": "^2.3.1",
"@types/downloadjs": "^1.4.3",
"@types/lodash.debounce": "^4.0.7",
Expand Down Expand Up @@ -74,6 +81,7 @@
"@sentry/types": "^8.15.0",
"@storybook/addon-actions": "^8.1.11",
"@types/lodash": "^4.14.200",
"@vitejs/plugin-vue": "^5.1.1",
"@vue/shared": "^3.2.45",
"@vueuse/core": "^10.11.0",
"centrifuge": "^5.2.2",
Expand All @@ -89,7 +97,7 @@
"lodash.isstring": "^4.0.1",
"lodash.pick": "^4.4.0",
"moment": "^2.29.4",
"nuxt": "^3.8.2",
"nuxt": "^3.12.4",
"pinia": "^2.0.30",
"pluralize": "^8.0.0",
"tailwindcss": "^3.2.4",
Expand Down
Loading

0 comments on commit 7d36df7

Please sign in to comment.