-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WARNING: At this point, the Storybook does not work properly, because it does not use the proper files from sigma (it uses the sources instead of the built version). The new build is based on the following blog post: https://betterprogramming.pub/getting-started-with-storybook-without-a-javascript-framework-c2968d3f3d9f
- Loading branch information
Showing
14 changed files
with
14,035 additions
and
3,561 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
// Specify the environments where the code will run | ||
"env": { | ||
"jest": true, // Enable Jest for testing | ||
"browser": true // Enable browser environment | ||
}, | ||
|
||
// Stop ESLint from searching for configuration in parent folders | ||
"root": true, | ||
|
||
// Specify the parser for TypeScript (using @typescript-eslint/parser) | ||
"parser": "@typescript-eslint/parser", // Leverages TS ESTree to lint TypeScript | ||
|
||
// Add additional rules and configuration options | ||
"plugins": ["@typescript-eslint"], | ||
|
||
// Extend various ESLint configurations and plugins | ||
"extends": [ | ||
"eslint:recommended", // ESLint recommended rules | ||
"plugin:@typescript-eslint/recommended", // TypeScript recommended rules | ||
"plugin:@typescript-eslint/eslint-recommended", // ESLint overrides for TypeScript | ||
"prettier", // Prettier rules | ||
"plugin:prettier/recommended", // Prettier plugin integration | ||
"plugin:storybook/recommended" // Recommended rules for Storybook | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
node_modules | ||
.DS_Store | ||
.vscode | ||
|
||
dist | ||
build | ||
|
||
*.d.ts | ||
*.js | ||
#storybook build directory | ||
storybook-static |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { join, dirname } from "path"; | ||
|
||
/** | ||
* This function is used to resolve the absolute path of a package. | ||
* It is needed in projects that use Yarn PnP or are set up within a monorepo. | ||
*/ | ||
function getAbsolutePath(value) { | ||
return dirname(require.resolve(join(value, "package.json"))); | ||
} | ||
|
||
/** @type { import('@storybook/html-vite').StorybookConfig } */ | ||
const config = { | ||
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"], | ||
addons: [ | ||
getAbsolutePath("@storybook/addon-links"), | ||
getAbsolutePath("@storybook/addon-essentials"), | ||
getAbsolutePath("@storybook/addon-interactions"), | ||
], | ||
framework: { | ||
name: getAbsolutePath("@storybook/html-vite"), | ||
options: {}, | ||
}, | ||
docs: { | ||
autodocs: "tag", | ||
}, | ||
}; | ||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/** @type { import('@storybook/html').Preview } */ | ||
const preview = { | ||
parameters: { | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/i, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export default preview; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.