{"id":18546444,"url":"https://github.com/adroll/gulp-react-docs","last_synced_at":"2025-04-09T20:30:54.983Z","repository":{"id":47891611,"uuid":"48192519","full_name":"AdRoll/gulp-react-docs","owner":"AdRoll","description":"Gulp plugin for generating Markdown documentation for React components","archived":false,"fork":false,"pushed_at":"2023-01-05T09:03:24.000Z","size":454,"stargazers_count":41,"open_issues_count":13,"forks_count":6,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-03-24T11:12:15.107Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/gulp-react-docs","language":"JavaScript","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/AdRoll.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2015-12-17T18:55:52.000Z","updated_at":"2022-08-05T18:13:25.000Z","dependencies_parsed_at":"2023-02-03T22:01:38.825Z","dependency_job_id":null,"html_url":"https://github.com/AdRoll/gulp-react-docs","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdRoll%2Fgulp-react-docs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdRoll%2Fgulp-react-docs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdRoll%2Fgulp-react-docs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdRoll%2Fgulp-react-docs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AdRoll","download_url":"https://codeload.github.com/AdRoll/gulp-react-docs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247785943,"owners_count":20995644,"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":[],"created_at":"2024-11-06T20:24:59.880Z","updated_at":"2025-04-09T20:30:54.693Z","avatar_url":"https://github.com/AdRoll.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gulp-react-docs\n\nA [gulp](http://gulpjs.com/) plugin for generating documentation in Markdown format for React components based on their `propTypes`. The plugin uses [react-docgen](https://github.com/reactjs/react-docgen) to extract component prop information, and then render the markdown using [handlebars](http://handlebarsjs.com/).\n\nThis plugin is an extension of the automatic documentation generation tool we use at [AdRoll](http://tech.adroll.com) for our reusable component library as written about [here](http://tech.adroll.com/blog/frontend/2015/11/12/rollup-react-and-npm-at-adroll.html#automatic-documentation-generation).\n\n## Installation\n\nInstall package with [npm](http://npmjs.org/) and add it to your development dependencies:\n\n`npm install gulp-react-docs --save-dev`\n\n## Information\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd\u003ePackage\u003c/td\u003e\u003ctd\u003egulp-react-docs\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eDescription\u003c/td\u003e\n\u003ctd\u003eGenerates Markdown documentation for React components based on component `propTypes`.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eNode Version\u003c/td\u003e\n\u003ctd\u003e\u003e= 10\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## Usage\n\n```js\nvar gulpReactDocs = require('gulp-react-docs');\n\ngulp.task('react-docs', function() {\n    var docsDest = 'docs';\n\n    return gulp.src('./components/**/*.jsx')\n        .pipe(gulpReactDocs({\n            path: docsDest\n        }))\n        .pipe(gulp.dest(docsDest));\n});\n```\n\nFor example usage, see our example `gulpfile.js` [here](./example/gulpfile.js).\n\nFor example output, see the generated docs [example/docs](./example/docs) generated from the files in [example/components](./example/components).\n\n### Options\nThe `gulp-react-docs` plugin can take an `options` object. The following attributes may be passed as part of the `options` object:\n\n#### path\n\n* Type: `string` OR `function`\n* Default: `undefined`\n\nThe path specifying the destination directory for your generated documentation files. This option is used to generate links from the output `.md` files to the source code. See the link produced below the heading [here](./example/docs/README.md#baz) for an example. If this option is not given, the link to the source code will not be generated. The `path` can be either a string or a function.\n\nIf you pass in a string, `path` should be the relative path from the `gulpfile.js` using the `gulp-react-docs` plugin to where the generated documentation will be output. The `path` will then be used to generate the relative path from the output documentation to the source code.\n\nIf you pass in a function, `path` is expected to return a string. The return value can be either a relative from where the generated documentation will be output to the source code, or an absolute path / URL pointing to the source code.\n\n## Contributors\n\n- [@marsjosephine](https://github.com/marsjosephine)\n- [@jtuulos](https://github.com/jtuulos)\n- [@jgrist](https://github.com/jgrist)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadroll%2Fgulp-react-docs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadroll%2Fgulp-react-docs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadroll%2Fgulp-react-docs/lists"}