Friday, March 25, 2016

New update to the CFDoc Sublime plugin (CFMLDocPlugin)

Wow, I am really bad at keeping up with this blogging thing.. Will try to do better!

For now, just a small update, I released a new version of the CFDoc sublime plugin.

If you don't know what it is; It's a sublime plugin which automatically generates inline CFDoc comment blocks for CFML components and functions.

You can find it in the Sublime Package Manager under CFMLDocPlugin, or at https://github.com/MFernstrom/cfmldocplugin

Install it and set a key combination such as [{ "keys": ["ctrl+shift+2"], "command": "docifycfml" }]

An example:

public array function myAwesomeFunction( required string awesome, maybeAwesome = "totally" ) hint="My text here" {
    return arguments.awesome;
}
 
Turns into


    /**
      * My text here
      *
      * @method myAwesomeFunction
      * @public
      * @param {string} awesome (required)
      * @param {any} [maybeAwesome = "totally" ] 
      * @return {array}
      */
    public array function myAwesomeFunction( required string awesome, maybeAwesome = "totally" ) hint="My text here" {
        return arguments.awesome;
    }

You can then use YuiDoc or other compatible tools to generate documentation for your cfml code.