styleguidist/react-styleguidist

Testing examples in continuous integration

Open

#877 创建于 2018年3月19日

在 GitHub 查看
 (3 评论) (0 反应) (0 负责人)TypeScript (1,416 fork)github user discovery
help wantedrequest for comments

仓库指标

Star
 (11,091 star)
PR 合并指标
 (PR 指标待抓取)

描述

My team's living styleguide is getting broken frequently without us noticing. In particular, examples in markdown files are falling out of date and end up broken. This is particularly concerning because those are supposed to be "best practice" snippets which are likely to be copy and pasted as a starting point for other devs.

This hasn't been an issue with storybook stories because the build will break in those cases, either because of snapshots changing or typescript will complain.

I would like to get our build failing in these cases so we catch this in CI. How would you recommend doing so? Is there documentation that I have overlooked?

I experimented with snapguistist, but there's no support for running those snapshots in CI yet and that wouldn't necessarily catch all classes of errors.

We're using react-docgen-typescript but I suppose this question is more general than that.

贡献者指南