mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 10:59:53 +00:00
Add stories for the media assets sidebar tab for easier prototyping. Includes mocks for storybook. Because some functions in the mocks are only used in the storybook main.ts resolve, knip flags them as unused because it doesn't check that path. So knipIgnoreUnusedButUsedByStorybook was added. Part of the QPO v2 iteration, figma design can be found [here](https://www.figma.com/design/LVilZgHGk5RwWOkVN6yCEK/Queue-Progress-Modal?node-id=3330-37286&m=dev). This will be implemented in a series of stacked PRs that can be reviewed and merged individually. main <-- #7737, #7743, #7745 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7743-QPOv2-Add-stories-for-list-view-and-general-job-card-2d26d73d365081bca59afa925fb232d7) by [Unito](https://www.unito.io) --------- Co-authored-by: GitHub Action <action@github.com>
75 lines
2.0 KiB
TypeScript
75 lines
2.0 KiB
TypeScript
import type { KnipConfig } from 'knip'
|
|
|
|
const config: KnipConfig = {
|
|
workspaces: {
|
|
'.': {
|
|
entry: [
|
|
'{build,scripts}/**/*.{js,ts}',
|
|
'src/assets/css/style.css',
|
|
'src/main.ts',
|
|
'src/scripts/ui/menu/index.ts',
|
|
'src/types/index.ts',
|
|
'src/storybook/mocks/**/*.ts'
|
|
],
|
|
project: ['**/*.{js,ts,vue}', '*.{js,ts,mts}']
|
|
},
|
|
'apps/desktop-ui': {
|
|
entry: ['src/main.ts', 'src/i18n.ts'],
|
|
project: ['src/**/*.{js,ts,vue}']
|
|
},
|
|
'packages/tailwind-utils': {
|
|
project: ['src/**/*.{js,ts}']
|
|
},
|
|
'packages/design-system': {
|
|
entry: ['src/**/*.ts'],
|
|
project: ['src/**/*.{js,ts}', '*.{js,ts,mts}']
|
|
},
|
|
'packages/registry-types': {
|
|
project: ['src/**/*.{js,ts}']
|
|
}
|
|
},
|
|
ignoreBinaries: ['python3', 'gh'],
|
|
ignoreDependencies: [
|
|
// Weird importmap things
|
|
'@iconify/json',
|
|
'@primeuix/forms',
|
|
'@primeuix/styled',
|
|
'@primeuix/utils',
|
|
'@primevue/icons'
|
|
],
|
|
ignore: [
|
|
// Auto generated manager types
|
|
'src/workbench/extensions/manager/types/generatedManagerTypes.ts',
|
|
'packages/registry-types/src/comfyRegistryTypes.ts',
|
|
// Used by a custom node (that should move off of this)
|
|
'src/scripts/ui/components/splitButton.ts'
|
|
],
|
|
compilers: {
|
|
// https://github.com/webpro-nl/knip/issues/1008#issuecomment-3207756199
|
|
css: (text: string) =>
|
|
[...text.replaceAll('plugin', 'import').matchAll(/(?<=@)import[^;]+/g)]
|
|
.map((match) => match[0].replace(/url\(['"]?([^'"()]+)['"]?\)/, '$1'))
|
|
.join('\n')
|
|
},
|
|
vite: {
|
|
config: ['vite?(.*).config.mts']
|
|
},
|
|
vitest: {
|
|
config: ['vitest?(.*).config.ts'],
|
|
entry: [
|
|
'**/*.{bench,test,test-d,spec}.?(c|m)[jt]s?(x)',
|
|
'**/__mocks__/**/*.[jt]s?(x)'
|
|
]
|
|
},
|
|
playwright: {
|
|
config: ['playwright?(.*).config.ts'],
|
|
entry: ['**/*.@(spec|test).?(c|m)[jt]s?(x)', 'browser_tests/**/*.ts']
|
|
},
|
|
tags: [
|
|
'-knipIgnoreUnusedButUsedByCustomNodes',
|
|
'-knipIgnoreUnusedButUsedByVueNodesBranch'
|
|
]
|
|
}
|
|
|
|
export default config
|