Gobble plugin to generate Leafdoc (🍂doc) documentation.
npm install gobble-leafdocGobble plugin to generate Leafdoc (🍂doc) documentation.
I assume you already know the basics of Gobble.
``bash`
npm i -D gobble-leafdoc
And I also assume that you also have some code with Leafdoc-style
documentation on it.
In your gobblefile, run the leafdoc gobble transform with a output option, like so:
`javascript`
var gobble = require( 'gobble' );
module.exports = gobble( 'src' ).transform( 'leafdoc', {
output: 'documentation.html'
});
Any Leafdoc-specific options can be specified in the transform options, for example:
`javascript`
module.exports = gobble( 'src' ).transform( 'leafdoc', {
output: 'documentation.html',
templateDir: 'assets/custom-leafdoc-templates',
leadingCharacter: '@'
});
Additionally, the files option can be used to order and filter files to be files
parsed with Leafdoc. This is useful when creating subsets of documentation, or
adding some leading/trailing content. The option is a minimatch
pattern, or an array of minimatch patterns.
`javascript`
module.exports = gobble( 'src' ).transform( 'leafdoc', {
output: 'documentation.html',
files: [
'first-very-important-thing.leafdoc',
'*/.js',
'credits.leafdoc'
]
});
```
"THE BEER-WARE LICENSE":
can do whatever you want with this stuff. If we meet some day, and you think
this stuff is worth it, you can buy me a beer in return.