TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

JavaScript Documentation Sucks

10 点作者 hbrundage超过 13 年前

2 条评论

jmreidy超过 13 年前
Swagger goes part of the way towards solving this problem, at least for REST apis: <a href="http://swagger.wordnik.com/" rel="nofollow">http://swagger.wordnik.com/</a>. It's a little annotation heavy for me - I'm guessing you want something that's generated almost entirely from code introspection. And it obviously doesn't work for library code. But I think the UX for an implementer is a great one.<p>I do love Readme Driven Development (<a href="http://tom.preston-werner.com/2010/08/23/readme-driven-development.html" rel="nofollow">http://tom.preston-werner.com/2010/08/23/readme-driven-devel...</a>), and Github helps here with its per-directory readme displays, but keeping up with these over the duration of a project is obviously a problem, as you note.
secoif超过 13 年前
You <i>can</i> repurpose Docco as a running commentary for library usage or for examples. This combines the readability of Docco with the awesome usefulness of usage examples.<p>It also allows you to easily run your example code as part of your test suite. Nothing more frustrating than broken example code.<p>e.g. <a href="http://dev.groupdock.com/kin/" rel="nofollow">http://dev.groupdock.com/kin/</a>