Skip to content

Commit

Permalink
WIP: example migration to storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
sim51 committed Feb 4, 2024
1 parent e1bf700 commit a7d8f1d
Show file tree
Hide file tree
Showing 16 changed files with 94,710 additions and 12 deletions.
109 changes: 109 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 2 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,13 @@
"demo:build": "npm run build --workspace=@sigma/demo",
"website:build": "npm run build --workspace=@sigma/website",
"website:all": "npm run website:build && npm run demo:build && cp -R packages/demo/build packages/website/build/demo && npm run examples:build && cp -R packages/examples/build packages/website/build/examples",
"storybook:run": "storybook dev -p 6006",
"storybook:build": "storybook build"
"storybook:run": "npm run start --workspace=@sigma/storybook",
"storybook:build": "npm run build --workspace=@sigma/storybook"
},
"devDependencies": {
"@storybook/addon-essentials": "^7.6.12",
"@storybook/addon-interactions": "^7.6.12",
"@storybook/addon-links": "^7.6.12",
"@storybook/blocks": "^7.6.12",
"@storybook/html": "^7.6.12",
"@storybook/html-vite": "^7.6.12",
"@storybook/html-webpack5": "^7.6.12",
"@storybook/test": "^7.6.12",
"lerna": "^8.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"storybook": "^7.6.12",
"typescript": "^5.2.2",
"vite": "^5.0.12"
}
Expand Down
4 changes: 3 additions & 1 deletion .storybook/main.ts → packages/storybook/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { mergeConfig } from "vite";

/** @type { import('@storybook/html-vite').StorybookConfig } */
const config: StorybookConfig = {
stories: ["../packages/**/src/**/*.mdx", "../packages/**/src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
stories: ["../stories/**/stories.ts", "../../**/src/**/*.mdx", "../../**/src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
addons: [
getAbsolutePath("@storybook/addon-links"),
getAbsolutePath("@storybook/addon-essentials"),
Expand All @@ -18,9 +18,11 @@ const config: StorybookConfig = {
docs: {
autodocs: "tag",
},
staticDirs: ["../public"],
logLevel: "debug",
async viteFinal(config) {
return mergeConfig(config, {
assetsInclude: ["**/*.html"],
resolve: {
preserveSymlinks: true,
},
Expand Down
File renamed without changes.
23 changes: 23 additions & 0 deletions packages/storybook/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "@sigma/stroybook",
"private": true,
"devDependencies": {
"@storybook/addon-essentials": "^7.6.12",
"@storybook/addon-interactions": "^7.6.12",
"@storybook/addon-links": "^7.6.12",
"@storybook/blocks": "^7.6.12",
"@storybook/html": "^7.6.12",
"@storybook/html-vite": "^7.6.12",
"@storybook/html-webpack5": "^7.6.12",
"@storybook/test": "^7.6.12",
"@storybook/web-components": "^7.6.12",
"storybook": "^7.6.12"
},
"scripts": {
"start": "storybook dev -p 6006",
"build": "storybook build"
},
"dependencies": {
"storybook-addon-run-script": "^0.1.4"
}
}
Loading

0 comments on commit a7d8f1d

Please sign in to comment.