doxie.append
v0.1.0
Published
Add a string at the end of your docs.
Downloads
6
Readme
A plugin for doxie.
Add a string at the end of your docs.
CLI Usage
doxie --append
is a plugin for the command-line tool doxie. Many plugins are designed for dox data. Install all three if you haven’t already:
$ npm install --global dox doxie doxie.append
Any string you --append
will be appended at the end of your docs:
$ echo '' | dox | doxie --append 'a b c\n' --append 'def\n' --output
a b c
def
Programmatic usage
doxie.append
can be used directly with doxie-core – the backend of doxie. Install both if you haven’t already:
$ npm install doxie-core doxie.append
Pass a single string to doxie.append
to instantiate the plugin:
const doxie = require('doxie-core');
const render = require('doxie.render');
const append = require('doxie.append');
const output = require('doxie.output');
const myDoxData = [{isPrivate: true}, {isPrivate: false}, {isPrivate: false}];
doxie([
render(({data}) => `${data.isPrivate ? 'Sshhh…' : 'Boom!'}\n`),
append('AAAAAAA!\n'),
output(),
])(myDoxData).output;
//» "Sshhh…\nBoom!\nBoom!\nAAAAAAA!\n"