Skip to content

Commit

Permalink
Exclude unnecessarily tracked coverage files
Browse files Browse the repository at this point in the history
Responds to issue storybookjs#30525
  • Loading branch information
kpowkitty committed Feb 24, 2025
1 parent 0aa2e8c commit 1b2a74f
Show file tree
Hide file tree
Showing 1,905 changed files with 108,988 additions and 2 deletions.
20 changes: 20 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@


/** @type { import('@storybook/react-vite').StorybookConfig } */
const config = {
"stories": [
"../stories/**/*.mdx",
"../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)"
],
"addons": [
"@storybook/addon-onboarding",
"@storybook/addon-essentials",
"@chromatic-com/storybook",
"@storybook/addon-interactions"
],
"framework": {
"name": "@storybook/react-vite",
"options": {}
}
};
export default config;
13 changes: 13 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/** @type { import('@storybook/react').Preview } */
const preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
};

export default preview;
8 changes: 8 additions & 0 deletions code/addons/test/src/node/vitest-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ export class VitestManager {
reportOnFailure: true,
reporter: [['html', {}], storybookCoverageReporter],
reportsDirectory: resolvePathInStorybookCache(COVERAGE_DIRECTORY),
exclude: [
'**/*.config.*',
'**/*.workspace.*',
'**/.storybook/**',
'**/.yarn/**',
'**/src/**/!(stories)/**',
'**/src/**/*.stories.*',
],
}
: { enabled: false }
) as CoverageOptions;
Expand Down
2 changes: 1 addition & 1 deletion code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@
"built": false
}
},
"packageManager": "[email protected]",
"packageManager": "[email protected]+sha512.5383cc12567a95f1d668fbe762dfe0075c595b4bfff433be478dbbe24e05251a8e8c3eb992a986667c1d53b6c3a9c85b8398c35a960587fbd9fa3a0915406728",
"engines": {
"node": ">=18.0.0"
},
Expand Down
1 change: 1 addition & 0 deletions node_modules/.bin/lz-string

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

223 changes: 223 additions & 0 deletions node_modules/.yarn-state.yml

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

Loading

0 comments on commit 1b2a74f

Please sign in to comment.