Sphinx extension to add CoffeeScript support
Project description
About
This extension adds a CoffeeScript domain with autodoc support to Sphinx.
This relies on coffeedoc to extract source comments from .coffee files. To install coffeedoc globally:
npm install -g coffeedoc
Usage
First you must add the extension to your list of extensions in conf.py:
extensions = ['sphinx.ext.autodoc', 'sphinxcontrib.coffeedomain']
Because Python has no clue about where your sources are, you must tell it where to look in your conf.py like so:
coffee_src_dir = os.path.abspath('../')
Finally, if your project is primarily CoffeeScript, you might want to define the primary domain as well:
primary_domain = 'coffee'
Directives and Roles
This domain provides module, function, class and method directives, as well as meth, class, and func roles for cross-referencing. In order to reference another object, use it’s fully-qualified name: The module name, a double colon, and the dot separate path to the object within the module.
For example, to reference the swizzle function in the file lib/widgets.coffee, write :coffee:func:`lib/widgets::swizzle. You can drop the leading :coffee if your primary domain has been set to coffee, and you can drop the module name iff you are linking from within the lib/widgets module.
Autodoc
You can document entire modules easily with automodule:
.. automodule:: mymodule
:members:
Notes/Todo
While basic functionality is usable at this point,
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file sphinxcontrib-coffee-0.1.0.tar.gz
.
File metadata
- Download URL: sphinxcontrib-coffee-0.1.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2dc4ab3138b4da7ac4e1639d06f9cb0ca9f86c059f91ffb11a72ec1472cd04d3 |
|
MD5 | 5ac4ad828ac0cf80e8662a492a4a6b15 |
|
BLAKE2b-256 | 346ce23bd698905daa45f750337f1425ec563774ac02796e386617f621911937 |