{"id":15536404,"url":"https://github.com/atanasster/storybook-dep-webpack-plugin","last_synced_at":"2025-03-21T12:33:34.563Z","repository":{"id":35113933,"uuid":"208402211","full_name":"atanasster/storybook-dep-webpack-plugin","owner":"atanasster","description":"A webpack plugin to collect dependencies data.","archived":false,"fork":false,"pushed_at":"2023-01-07T22:21:52.000Z","size":3222,"stargazers_count":2,"open_issues_count":9,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-16T07:04:51.182Z","etag":null,"topics":["dependencies","storybook","webpack"],"latest_commit_sha":null,"homepage":"https://atanasster.github.io/storybook-addon-deps/?path=/deps/design-system-avatarlist--short","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/atanasster.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-14T06:58:27.000Z","updated_at":"2021-05-12T21:42:29.000Z","dependencies_parsed_at":"2023-01-15T14:06:34.801Z","dependency_job_id":null,"html_url":"https://github.com/atanasster/storybook-dep-webpack-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atanasster%2Fstorybook-dep-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atanasster%2Fstorybook-dep-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atanasster%2Fstorybook-dep-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atanasster%2Fstorybook-dep-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atanasster","download_url":"https://codeload.github.com/atanasster/storybook-dep-webpack-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221456223,"owners_count":16824954,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dependencies","storybook","webpack"],"created_at":"2024-10-02T11:51:34.140Z","updated_at":"2024-10-28T10:10:22.723Z","avatar_url":"https://github.com/atanasster.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# storybook-dep-webpack-plugin\n\nA webpack plugin to collect dependencies data.\u003cbr /\u003e\nWorks in conjunction with [storybook-addon-deps](https://github.com/atanasster/storybook-addon-deps/)\n\n![Dependencies plugin](./doc/storybook_dependencies.gif)\n\n## Live demo\n[grommet-controls](https://atanasster.github.io/grommet-controls/?path=/docs/controls-controls-avatar--main)\n\n\n## Installation\n```sh\nnpm i -D storybook-dep-webpack-plugin\n```\n\n## Usage\n\nYou can register the plugin in two different ways\n\n### 1. New way - inside your storybook `main.js` webpack settings you will register the plugin:\n\n```js\nconst DependenciesPlugin = require('storybook-dep-webpack-plugin');\n\nmodule.exports = {\n...\n  webpack: async (config, { configType }) =\u003e ({\n    ...config,\n    plugins: [\n      ...config.plugins,\n      new DependenciesPlugin()\n    ]\n  }),\n...\n};\n\n```\n\n### 2. Older way - in your storybook `webpack.config.js` file, add and configure the plugin:\n\n```js\nconst DependenciesPlugin = require('storybook-dep-webpack-plugin');\n\nmodule.exports = ({ config, mode }) =\u003e {\n  ...\n  config.plugins.push(new DependenciesPlugin());\n  ...\n  return config;\n};\n```\n\n## Options\n**filter** - a RegExp or function to select the stories.\u003cbr/\u003e\nexample: \n```\n  config.plugins.push(new DependenciesPlugin({\n    filter: (resource) =\u003e {\n      return /\\.(stories|story)\\.[tj]sx?$/.test(resource) \u0026\u0026 resource.indexOf(\"Avatar\") \u003e -1;\n    }\n  }));\n```\n\n**exclude** - a RegExp for the modules to exclude.\u003cbr/\u003e\nexample: \n```\n  config.plugins.push(new DependenciesPlugin({\n    filter: /^@storybook|@babel/,\n  }));\n```\n\n**maxLevels** - How many levels deep to follow the dependencies.\u003cbr/\u003e\nexample: \n```\n  config.plugins.push(new DependenciesPlugin({\n    maxLevels: 10,\n  }));\n```\n\n**pickProperties** - An array of the props to pick from the module webpack data.\u003cbr/\u003e\nexample: \n```\n  config.plugins.push(new DependenciesPlugin({\n    pickProperties: ['id', 'name', 'request'],\n  }));\n```\n\n**pickModuleProperties** - An array of the props to pick from the module.module webpack data.\u003cbr/\u003e\nexample: \n```\n  config.plugins.push(new DependenciesPlugin({\n    pickModuleProperties: [],\n  }));\n```\n\n## Install and configure `storybook-addon-deps`\n[storybook-addon-deps](https://github.com/atanasster/storybook-addon-deps/blob/master/README.md)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatanasster%2Fstorybook-dep-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatanasster%2Fstorybook-dep-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatanasster%2Fstorybook-dep-webpack-plugin/lists"}