1 post

React Styleguidist Usage Examples in Typescript Files

React Styleguidist uses external Markdown files to store usage examples. We wanted to use TypeScript for examples because reasons and we managed to do this with horrible solution. It includes custom webpack loader that parses TypeScript file with regular expressions and converts it to markdown. You could find parts of our code below.