Closed myguidingstar-zz closed 10 years ago
That's not a trivial thing to do.. But it definitely is possible
(usage add) => (add 1 1) -> 2
Would you be interested in helping with the implementation?
On 26/11/2013, at 15:28, Hoàng Minh Thắng notifications@github.com wrote:
I find lein-midje-doc the right way to do literate programming. But during playing around REPL the test cases should be accessible, too. Two approaches:
automatically append test cases to docstring (update metadata) provide an other form rather than (doc a-symbol), for example (test-doc a-symbol) (Sorry if this question is silly because I myself haven't try lein-midje-doc yet) — Reply to this email directly or view it on GitHub.
After a bit more thinking and research:
What do you think?
Hmmm... That's a good point. A kind of a hack would be to add an extra :usage key to project.clj and then have a list of generated files. Another way is to generate the usage file within the resource directory and automatically load that.
I've added this functionality as of 0.0.21. Documentation and hardening of these features will come later but they are currently usable (though expect some bugs). I will add fixes as they come up
I find lein-midje-doc the right way to do literate programming. But during playing around REPL the test cases should be accessible, too. I can think of two approaches:
(doc a-symbol)
, for example(test-doc a-symbol)
(Sorry if this question is silly because I myself haven't try lein-midje-doc yet)