Faire / mjml-react

React component library to generate the HTML emails on the fly
https://www.npmjs.com/package/@faire/mjml-react
MIT License
387 stars 17 forks source link

Update doc tags to pull description strings #45

Closed emmclaughlin closed 2 years ago

emmclaughlin commented 2 years ago

Related to #9

This is an attempt to automatically generate documentation in the typescript code using the mjml package exports.

Currently we extract the default values from the component that the package exports. The description however is only available through parsing the markdown in the readme file. This is a brief attempt at parsing the readme file and appending the descriptions to the typescript code. There are some limitations, particularly in the regex used to get the values in the table. However, it does a pretty good job at pulling descriptions.