Skip to content

[Feature request] Support simultaneous Clojure & ClojureScript output #216

@ptaoussanis

Description

@ptaoussanis

Hi James, thanks so much for all the awesome work on Codox - and so many other libraries over the years! 🙏 🙏

No urgency, but when you get an opportunity would appreciate your input on this.

I author quite a few libraries that include both a Clojure and ClojureScript API.

My understanding is that currently Codox can generate either:

  1. Documentation for {:language :clojure}, or
  2. Documentation for {:language :clojurescript} (which includes relevant Clojure macros).

But for the kinds of cross-platform libraries I'm talking about (e.g. Encore, Timbre, Sente, etc.) - it'd actually be ideal if Codox could generate API docs from the perspective of both Clojure and ClojureScript users.

From what I can tell, cljdoc handles these cases by just combining everything together. For example, here you'll see clj, cljs, and clj/s vars all visible from the same list.

My 2c is it'd actually be better (and I suspect simpler) to instead require users to make a top-level choice: i.e. to browse the Clojure documentation, or the ClojureScript documentation.

I'd just like to have both available to the user.

A few motivations for this approach:

  • No need to consider the layout and style when differences occur between clj/s.
  • No trouble when there's disagreement in args and/or docstrings across platforms.
  • I believe that when viewing documentation, most users will have in mind a particular platform - so filtering to show only that platform should help cut down on noise.
  • My hope/expectation is that something like this might not be too difficult to implement?

Does this make sense / seem reasonable?

Thanks so much for your time! Cheers :-)
- Peter

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions