Code Monkey home page Code Monkey logo

docstract's People

Contributors

lloyd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

docstract's Issues

custom tag support

should be able to specify custom tags and callbacks to process their textual arguments.

support @see / @seealso

where this may be a blob of text and it's up to the renderer to decide how to link/display it. Multiple @see fields can occur in a documentation block, so JSON representation should be an array. Example:

@see #module/menu/MenuItem
@seealso #module/path/dirname

NOTE: again, I'm don't think it makes any sense to impose restrictions on the value of the @see
tag, that's up to mr renderer. In this example it's a hashtag that's meaningful in some renderer I'm familiar with (chromeless).

Participate in DocSpec

Hi,

I currently worked out a specification to make results of DocTools interoperable. This is completely new and the spec is just one day old. The idea of this spec is, that doctools deliver their output in this interoperable format and generating the output can be done by others, that don't want to work on the parsing part.

The benefits would be:

  • End users can choose whatever doctool they want and which output generator they want.
  • Doctool developers can focus on parsing the code, generate a standardised output and leave the output generation to the end users (doesn't that sound like less work for you?)

My blog post with my motivation for creating this: http://gos.si/blog/docspec-as-interoperable-file-format-between-doctools

As I said the DocSpec is not older than a day, you are invited to join here. Also if you feel like this idea suits your doctool, feel free to jump over to express your interesst in participating as an implementor.

The DocSpec is on github, ready to fork: https://github.com/gossi/docspec

Thank you
gossi

support for optional arguments

Docstract should deal with some syntax to indicate optional arguments and populate a flag in the output json. Suggestion? Use brackets:

@param {string} [foo]

output:

{
    "name": "foo",
    "type": "string",
    "optional": true
}

improve guessing heuristics

The block type guessing heuristics are too simple and stupid right now. I'm thinking that we should instead have a list of guessing functions. Inputs to the function are:

  • The information we've parsed out of the content block (many tags may not be present in all types of documentation blocks)
  • The first non-whitespace line of code after the content block

The function should then either return the guessed name and type of the docblock, or fail. This method will ultimately allow client code to specify its own heuristics to append to the list.

line numbers

For each documented atom it would be nice if line numbers were included in the JSON. This would allow renderers to do fancier linking and inline code display.

support for object arguments

Currently there's no way to have a complex argument like an object. Here's some example source code where this would be useful (currently inline markdown is used to document complex args):

https://github.com/mozilla/chromeless/blob/e387b27/packages/addon-kit/lib/request.js#L122-161

Syntax may look something like this:

/**
 * @function open
 * Opens a new tab.
 *
 * @param options {object
 *   @prop [url] {string}
 *   String URL to be opened in the new tab.
 * }
 * Options for the new tab.
 */

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.