Can I configure Styleguidist to run a script before every build / doc refresh?

108 Views Asked by At

I'm using Styleguidist to magically document my React Components and it's great. I have a couple of non-component utility libraries that I doc using JSDoc, and at present I compile their docs to markdown (using jsdoc2md) and tell Styleguidist to include that markdown doc as extra documentation.

I've added a npm script that builds the markdown and then runs Styleguidist, and that's working fine, but when I update a library I have to stop Styleguidist, re-run the script, then start Styleguidist again.

Styleguidist in watch mode already re-builds its docs when it detects a file change; is there some way to configure Styleguidist to run my markdown-creating script every time before it re-generates like that?

0

There are 0 best solutions below