toga

The streaming documentation generator.

NOTE: This project is under active development. APIs subject to change.

toga

One tool and one destination for all project documentation including user guides, developer guides, styleguides, and api documentation for both front and back-end technologies. Source code for an entire project is streamed into documentation via Transform Streams a la gulp.

Module:

$ npm install --save-dev toga

CLI:

$ npm install --global toga
Usage: toga [options]
 
Options:
 
    -h, --help           output usage information
    -c, --config <file>  specify configuration file [togafile.js]
    -d, --cwd <dir>      specify working directory [.]
    -v, --verbose        log actions as they happen
    -V, --version        output the version number
var toga = require('toga'); // Loads toga. 
 
toga.src(files);      // Just `require('vinyl-fs').src`. 
toga.dest(directory); // Just `require('vinyl-fs').dest`. 
toga.join(stream...); // Just `require('multistream')`. 
var toga = require('toga'),
    css = require('toga-css'),
    js = require('toga-js'),
    md = require('toga-markdown'),
    pura = require('toga-pura'),
 
    config = {
        src: [
            './src/docs/**/*.md',
            './src/assets/**/*.css',
            './src/assets/**/*.js'
        ],
        dest: './web/docs'
    };
 
toga
    .src(config.src)
    .pipe(css.parser())
    .pipe(js.parser())
    .pipe(md.formatter())
    .pipe(pura.compiler())
    .pipe(toga.dest(config.dest));
var toga = require('toga'),
    css = require('toga-css'),
    js = require('toga-js'),
    perl = require('toga-perl'),
    md = require('toga-markdown'),
    sample = require('toga-sample'),
    pod = require('toga-pod'),
    pura = require('toga-pura'),
 
    config = {
        manual: './src/assets/**/*.md',
        css: './src/assets/**/*.css',
        js: './src/assets/**/*.js',
        perl: './lib/**/*.{pl,pm}',
        dest: './web/docs'
    },
 
    manual = toga
        .src(config.manual)
        .pipe(md.parser())
        .pipe(md.formatter()),
 
    client = toga
        .src(config.css)
        .pipe(css.parser())
        .pipe(js.parser())
        .pipe(sample.formatter())
        .pipe(md.formatter()),
 
    server = toga
        .src(config.perl)
        .pipe(perl.parser())
        .pipe(pod.formatter());
 
toga
    .join(manual, client, server)
    .pipe(pura.compiler())
    .pipe(toga.dest(config.dest));

Standards for this project, including tests, code coverage, and semantics are enforced with a build tool. Pull requests must include passing tests with 100% code coverage and no linting errors.

$ gulp test

© 2014 Shannon Moeller me@shannonmoeller.com

Licensed under MIT