7

For my JavaScript framework I would like to use Sphinx. Since I am new in the Sphinx world I would like you people to help me out getting started with Sphinx and JavaScript.

2 Answers 2

1

I believe you're looking for Sphinx' JavaScript Domain feature.

Edit: From a quick glean at the documentation & tools, it doesn't look like you can use ReST inside your JavaScript. You'll either have to fish out the documentation from the comments, or keep it around in sidecar-files.

Sign up to request clarification or add additional context in comments.

3 Comments

Thats fine, I dont want to use ReST inside my JavaScript library, it would be good if all the library members are automatically detected along with associated comments by the sphinx.
I don't quite follow; »auto-detect library« members and »associated comments by sphinx«? AFAIK, Sphinx doesn't know how to read JavaScript-code at all, so it can neither parse out functions or their associated documentation for you. That's why I suggested the use of sidecar files.
This is a delayed response on this, but I had been looking to see if someone else had done this. When I couldn't find anything, I just built something. github.com/Nuulogic/sphinx-jsapidoc I'd qualify it as alpha and it's very, very specific about the syntax you use -- It wants pure javascript. I have only tested it on the internal code for the company I work for, but it's working pretty solid for us.
0

Sorry for too late response )

Like you I want build docs for my own JS framework based on AngularJS.

And like oliverseal, I am built sphinx extension in native way for sphinx and ext.autodoc sphinxcontrib-autoanysrc

It simple and clean, but does have ext.autodoc features for auto generation signatures and others, but it enough for me store reST docs of framework API in js files )

You can implement ext.autodoc features with sphinxcontrib-autoanysrc extension check out autoanysrc.JSAnalyzer

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.