{"_id":"react-docgen-typescript-webpack-plugin","_rev":"6-45661e1441d5a8d2926cb79b8306d158","name":"react-docgen-typescript-webpack-plugin","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"react-docgen-typescript-webpack-plugin","version":"1.0.0","description":"Webpack plugin to generate docgen information from Typescript React components.","keywords":["storybook","react","docgen","typescript","webpack","plugin"],"homepage":"https://github.com/strothj/react-docgen-typescript-webpack-plugin","bugs":{"url":"https://github.com/strothj/react-docgen-typescript-webpack-plugin/issues"},"repository":{"type":"git","url":"https://github.com/strothj/react-docgen-typescript-webpack-plugin.git"},"author":{"name":"strothj","url":"https://github.com/strothj"},"main":"dist/index.js","license":"MIT","engines":{"node":">= 8.9","yarn":">= 1.3.2"},"pre-commit":["lint","test"],"files":["dist/index.js"],"scripts":{"build":"rollup -c","lint":"tslint -p ./","start":"rollup -c --watch","test":"jest"},"devDependencies":{"@types/jest":"^22.1.1","@types/memory-fs":"^0.3.0","@types/node":"^8.9.1","@types/react":"^16.0.36","@types/webpack":"^3.8.5","jest":"^22.2.1","memory-fs":"^0.4.1","prettier":"^1.10.2","react":"^16.2.0","rollup":"^0.55.3","rollup-plugin-json":"^2.3.0","rollup-plugin-typescript2":"^0.11.0","ts-jest":"^22.0.3","ts-loader":"^3.5.0","tslint":"^5.9.1","tslint-config-airbnb":"^5.6.0","tslint-config-prettier":"^1.7.0","tslint-language-service":"^0.9.8","tslint-plugin-prettier":"^1.3.0","typescript":"^2.7.1","typescript-snapshots-plugin":"^1.1.0","webpack":"^3.10.0"},"dependencies":{"ajv":"^6.1.1","react-docgen-typescript":"^1.2.3"},"_id":"react-docgen-typescript-webpack-plugin@1.0.0","dist":{"shasum":"1940f1ab5a231b94ead80cf3981380a8af159ff3","tarball":"https://registry.npmjs.org/react-docgen-typescript-webpack-plugin/-/react-docgen-typescript-webpack-plugin-1.0.0.tgz","fileCount":5,"unpackedSize":10521,"integrity":"sha512-9SiyS3mhYvG3sUoyOAtiV+5z/qAn+DhNJra1M7rF3EhppY4kueV/mOD4OERZQbui6nAVFsJwtG1p+G/ZExl8TQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDxyaG3jiRxaqeQ10RDgjJY0jVpvXHlTC3UmgX1vZStyAIgSACTFsGcRSOaHrOZHeXM/bXgVTWABx3CwCg8cREdOEE="}]},"maintainers":[{"name":"strothj","email":"jason@jasons.io"}],"_npmUser":{"name":"strothj","email":"jason@jasons.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-docgen-typescript-webpack-plugin_1.0.0_1518207794598_0.7669275676377538"},"_hasShrinkwrap":false},"1.0.1":{"name":"react-docgen-typescript-webpack-plugin","version":"1.0.1","description":"Webpack plugin to generate docgen information from Typescript React components.","keywords":["storybook","react","docgen","typescript","webpack","plugin"],"homepage":"https://github.com/strothj/react-docgen-typescript-webpack-plugin","bugs":{"url":"https://github.com/strothj/react-docgen-typescript-webpack-plugin/issues"},"repository":{"type":"git","url":"https://github.com/strothj/react-docgen-typescript-webpack-plugin.git"},"author":{"name":"strothj","url":"https://github.com/strothj"},"main":"dist/index.js","license":"MIT","engines":{"node":">= 8.9","yarn":">= 1.3.2"},"pre-commit":["lint","test"],"files":["dist/index.js"],"scripts":{"build":"rollup -c","lint":"tslint -p ./","start":"rollup -c --watch","test":"jest"},"devDependencies":{"@types/jest":"^22.1.1","@types/memory-fs":"^0.3.0","@types/node":"^8.9.1","@types/react":"^16.0.36","@types/webpack":"^3.8.5","jest":"^22.2.1","memory-fs":"^0.4.1","prettier":"^1.10.2","react":"^16.2.0","rollup":"^0.55.3","rollup-plugin-json":"^2.3.0","rollup-plugin-typescript2":"^0.11.0","ts-jest":"^22.0.3","ts-loader":"^3.5.0","tslint":"^5.9.1","tslint-config-airbnb":"^5.6.0","tslint-config-prettier":"^1.7.0","tslint-language-service":"^0.9.8","tslint-plugin-prettier":"^1.3.0","typescript":"^2.7.1","typescript-snapshots-plugin":"^1.1.0","webpack":"^3.10.0"},"dependencies":{"ajv":"^6.1.1","react-docgen-typescript":"^1.2.3"},"_id":"react-docgen-typescript-webpack-plugin@1.0.1","dist":{"shasum":"cb9fe5f40bf8de326ad8b7293ea6362368ac2da2","tarball":"https://registry.npmjs.org/react-docgen-typescript-webpack-plugin/-/react-docgen-typescript-webpack-plugin-1.0.1.tgz","fileCount":5,"unpackedSize":10614,"integrity":"sha512-LvYUKa1Zcq9PLucEa1Na5LJbJ0/fRgc2a9PrupH3AJe2iNXur+JUqObnBzFkPlczez9F5DPe+WWdPVUsvIBZyQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCi85n2om8TLnfwcjRTF7cxU8d1o/2pPu+hA3KL3Q5kCgIhAPQpQF2Aq8i+qi5ziTQDqb/rlDYNW8KZqaGA+pQSFQO8"}]},"maintainers":[{"name":"strothj","email":"jason@jasons.io"}],"_npmUser":{"name":"strothj","email":"jason@jasons.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-docgen-typescript-webpack-plugin_1.0.1_1518227302507_0.8579347028609481"},"_hasShrinkwrap":false},"1.0.2":{"name":"react-docgen-typescript-webpack-plugin","version":"1.0.2","description":"Webpack plugin to generate docgen information from Typescript React components.","keywords":["storybook","react","docgen","typescript","webpack","plugin"],"homepage":"https://github.com/strothj/react-docgen-typescript-webpack-plugin","bugs":{"url":"https://github.com/strothj/react-docgen-typescript-webpack-plugin/issues"},"repository":{"type":"git","url":"https://github.com/strothj/react-docgen-typescript-webpack-plugin.git"},"author":{"name":"strothj","url":"https://github.com/strothj"},"main":"dist/index.js","license":"MIT","engines":{"node":">= 8.9","yarn":">= 1.3.2"},"pre-commit":["lint","test"],"files":["dist/index.js"],"scripts":{"build":"rollup -c","lint":"tslint -p ./","start":"rollup -c --watch","test":"jest"},"devDependencies":{"@types/jest":"^22.1.1","@types/memory-fs":"^0.3.0","@types/node":"^8.9.1","@types/react":"^16.0.36","@types/webpack":"^3.8.5","jest":"^22.2.1","memory-fs":"^0.4.1","pre-commit":"^1.2.2","prettier":"^1.10.2","react":"^16.2.0","rollup":"^0.55.3","rollup-plugin-json":"^2.3.0","rollup-plugin-typescript2":"^0.11.0","ts-jest":"^22.0.3","ts-loader":"^3.5.0","tslint":"^5.9.1","tslint-config-airbnb":"^5.6.0","tslint-config-prettier":"^1.7.0","tslint-language-service":"^0.9.8","tslint-plugin-prettier":"^1.3.0","typescript":"^2.7.1","typescript-snapshots-plugin":"^1.1.0","webpack":"^3.10.0"},"dependencies":{"ajv":"^6.1.1","react-docgen-typescript":"^1.2.3"},"_id":"react-docgen-typescript-webpack-plugin@1.0.2","dist":{"shasum":"c2375daf00f4a6193808805145b24c646c996e7d","tarball":"https://registry.npmjs.org/react-docgen-typescript-webpack-plugin/-/react-docgen-typescript-webpack-plugin-1.0.2.tgz","fileCount":5,"unpackedSize":10665,"integrity":"sha512-bovk44kWCkjW/ovhWqRzXs9LaArdV8K+NfmKAKzPP3ZigbWPrEx+jo+NvWG8hoeNOFgQFenyMV3QUXLAN5Ksuw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDJdmm51hdjA3U1ajRQRpZ+6ZhhFg09xx5myrE5pbvFgIgZkppS/G18AaUFNnJzwgN2VZQR/2tnjVq5bhiObA4aFE="}]},"maintainers":[{"name":"strothj","email":"jason@jasons.io"}],"_npmUser":{"name":"strothj","email":"jason@jasons.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-docgen-typescript-webpack-plugin_1.0.2_1518284449734_0.22548665609824337"},"_hasShrinkwrap":false},"1.1.0":{"name":"react-docgen-typescript-webpack-plugin","version":"1.1.0","description":"Webpack plugin to generate docgen information from Typescript React components.","keywords":["storybook","react","docgen","typescript","webpack","plugin"],"homepage":"https://github.com/strothj/react-docgen-typescript-webpack-plugin","bugs":{"url":"https://github.com/strothj/react-docgen-typescript-webpack-plugin/issues"},"repository":{"type":"git","url":"https://github.com/strothj/react-docgen-typescript-webpack-plugin.git"},"author":{"name":"strothj","url":"https://github.com/strothj"},"main":"dist/index.js","license":"MIT","engines":{"node":">= 8.9","yarn":">= 1.3.2"},"pre-commit":["lint","test"],"files":["dist/index.js"],"scripts":{"build":"rollup -c","lint":"tslint -p ./","start":"rollup -c --watch","test":"jest"},"devDependencies":{"@types/jest":"^22.1.1","@types/memory-fs":"^0.3.0","@types/node":"^8.9.1","@types/react":"^16.0.36","@types/webpack":"^3.8.5","jest":"^22.2.1","memory-fs":"^0.4.1","pre-commit":"^1.2.2","prettier":"^1.10.2","react":"^16.2.0","rollup":"^0.55.3","rollup-plugin-json":"^2.3.0","rollup-plugin-typescript2":"^0.11.0","ts-jest":"^22.0.3","ts-loader":"^3.5.0","tslint":"^5.9.1","tslint-config-airbnb":"^5.6.0","tslint-config-prettier":"^1.7.0","tslint-language-service":"^0.9.8","tslint-plugin-prettier":"^1.3.0","typescript":"^2.7.1","typescript-snapshots-plugin":"^1.1.0","webpack":"^3.10.0"},"dependencies":{"ajv":"^6.1.1","react-docgen-typescript":"^1.2.3"},"_id":"react-docgen-typescript-webpack-plugin@1.1.0","dist":{"shasum":"4bfb8c3312fce487083924842cf03f66177ab9df","tarball":"https://registry.npmjs.org/react-docgen-typescript-webpack-plugin/-/react-docgen-typescript-webpack-plugin-1.1.0.tgz","fileCount":5,"unpackedSize":11124,"integrity":"sha512-9e71HtUPHMzRzTCR0piXKvQzHGNMSFq7S1LUtfYL0bp4HRYVKjseV2WatpnkTrd4AGM4h8pb7AJtRIwy7cTE7g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFqaJ7yq11CUv+BfUZsgslZ4iHeNesHBuO1Wyaw+sBWWAiBelICWaLcC93PMiswii0NFHjyUlGmi8stc8idyTBNxtA=="}]},"maintainers":[{"name":"strothj","email":"jason@jasons.io"}],"_npmUser":{"name":"strothj","email":"jason@jasons.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-docgen-typescript-webpack-plugin_1.1.0_1518540098940_0.3219544210712697"},"_hasShrinkwrap":false}},"time":{"created":"2018-02-09T20:23:14.597Z","1.0.0":"2018-02-09T20:23:15.294Z","modified":"2022-06-25T20:18:26.194Z","1.0.1":"2018-02-10T01:48:23.284Z","1.0.2":"2018-02-10T17:40:50.453Z","1.1.0":"2018-02-13T16:41:39.658Z"},"maintainers":[{"name":"strothj","email":"jason@jasons.io"}],"description":"Webpack plugin to generate docgen information from Typescript React components.","homepage":"https://github.com/strothj/react-docgen-typescript-webpack-plugin","keywords":["storybook","react","docgen","typescript","webpack","plugin"],"repository":{"type":"git","url":"https://github.com/strothj/react-docgen-typescript-webpack-plugin.git"},"author":{"name":"strothj","url":"https://github.com/strothj"},"bugs":{"url":"https://github.com/strothj/react-docgen-typescript-webpack-plugin/issues"},"license":"MIT","readme":"# react-docgen-typescript-webpack-plugin\n\nWebpack plugin to generate docgen information from Typescript React components.\n\n## Installation\n\nAdd the package as a development dependency.\n\n```shell\n$ npm install --save-dev react-docgen-typescript-webpack-plugin\n\nor\n\n$ yarn add --dev react-docgen-typescript-webpack-plugin\n```\n\nAdd the plugin to your Webpack configuration.\n\n```javascript\nconst path = require(\"path\");\nconst genDefaultConfig = require(\"@storybook/react/dist/server/config/defaults/webpack.config.js\");\nconst TSDocgenPlugin = require(\"react-docgen-typescript-webpack-plugin\");\n\nmodule.exports = (baseConfig, env) => {\n  const config = genDefaultConfig(baseConfig);\n\n  config.module.rules.push({\n    test: /\\.tsx?$/,\n    include: path.resolve(__dirname, \"../src\"),\n    loader: require.resolve(\"ts-loader\"),\n  });\n\n  config.plugins.push(new TSDocgenPlugin());\n\n  config.resolve.extensions.push(\".ts\", \".tsx\");\n\n  return config;\n};\n```\n\n## Usage\n\n### Storybook Info Plugin\n\nInclude the `withInfo` decorator as normal.\n\n**Special Note:**\n\nThe Storybook Info addon will only attempt to read Docgen information when the\nstory name matches the name of the component. So if you have a component named\n`ColorButton`, then you will have to use something like:\n\n`storiesOf(\"...\", module).add(\"ColorButton\", ...)`\n\n---\n\n```javascript\nimport * as React from \"react\";\nimport { storiesOf } from \"@storybook/react\";\nimport { withInfo } from \"@storybook/addon-info\";\nimport ColorButton from \"./ColorButton\";\n\nstoriesOf(\"Components\", module).add(\n  \"ColorButton\",\n  withInfo({ inline: true })(() => (\n    <ColorButton color=\"blue\">Color Button</ColorButton>\n  )),\n);\n```\n\n## Experimental\n\nThis plugin is mostly a hack job at the moment. It is a work in progress so it\nis most likely not suitable for production. Pull requests are most welcome.\n\n## Limitations\n\nThis plugin makes use of the great project:\nhttps://github.com/styleguidist/react-docgen-typescript\n\nIt is subject to the same limitations. Component docgen information can not be\ngenerated for components who are only exported as default. You can work around\nthe issue by exporting the component using a named export.\n\n**CURRENT LIMITATION**\nThe current implementation seems to have trouble with the compiler option `module` being set to `esnext`.\n\n```javascript\nimport * as React from \"react\";\n\ninterface ColorButtonProps {\n  /** Buttons background color */\n  color: \"blue\" | \"green\";\n}\n\n/** A button with a configurable background color. */\nexport const ColorButton: React.SFC<ColorButtonProps> = props => (\n  <button\n    style={{\n      padding: 40,\n      color: \"#eee\",\n      backgroundColor: props.color,\n      fontSize: \"2rem\",\n    }}\n  >\n    {props.children}\n  </button>\n);\n\nexport default ColorButton;\n```\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","readmeFilename":"README.md"}