Skip to content

A relatively naive script to document generic components and their use inside a code-base

License

Notifications You must be signed in to change notification settings

byrichardpowell/Document-Generic-React-Components

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Document Generic React Components

A relatively naive script to document generic React components and their use inside a code-base.

Why?

React offers fantastic levels of composability which encourages many small generic and re-usable components. As such it can be hard to know what code already exists and what components can be re-used, re-purposed or removed. This script aims to solve that problem.

Sample

You can view the docs for the sample components on github, or you can view the Server Density docs for a real-world example.

Usage

To generate the docs for the components in this repository:

  1. $ git clone [email protected]:serverdensity/Document-Generic-React-Components.git
  2. npm install
  3. npm run docs

The docs will be generated at /docs.

Limitations

The script to generate the documentation was built for the specific requirements of the Server Density UI codebase. No configuration is provided and the script works based on assumptions that are only likely to be true in our code-base.

If you wish to use this yourself you will need to edit the code in scripts/create-generic-component-docs.js to make it work with the requirements of your code-base. The approach should be sound, but file paths, regular expressions, stuff like that will need to be customised.

It would be entirely possible to make this script configurable so that it can fit any code-base.

About

A relatively naive script to document generic components and their use inside a code-base

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • JavaScript 52.5%
  • CoffeeScript 47.5%