diff --git a/bin/documentation.js b/bin/documentation.js index 589a9bd..bef1fa6 100755 --- a/bin/documentation.js +++ b/bin/documentation.js @@ -9,6 +9,7 @@ var documentation = require('../'), highlight = require('../streams/highlight.js'), htmlOutput = require('../streams/output/html.js'), lint = require('../streams/lint.js'), + github = require('../streams/github.js'), fs = require('fs'), vfs = require('vinyl-fs'), normalize = require('../streams/normalize.js'), @@ -31,6 +32,10 @@ var yargs = require('yargs') .describe('p', 'generate documentation tagged as private') .alias('p', 'private') + .boolean('g') + .describe('g', 'infer links to github in documentation') + .alias('g', 'github') + .describe('o', 'output location. omit for stdout, otherwise is a filename for single-file outputs and a directory name for multi-file outputs like html') .alias('o', 'output') .default('o', 'stdout') @@ -74,6 +79,7 @@ if (!formatter) { var docStream = documentation(inputs) .pipe(normalize()) .pipe(argv.lint ? lint() : new PassThrough({ objectMode: true })) + .pipe(argv.g ? github() : new PassThrough({ objectMode: true })) .pipe(flatten()) .pipe(filterAccess(argv.private ? [] : undefined)) .pipe(formatter); diff --git a/package.json b/package.json index b929bca..7b77de3 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "doctrine": "^0.6.4", "espree": "^1.12.2", "extend": "^2.0.0", + "github-url-from-git": "^1.4.0", "handlebars": "^3.0.0", "highlight.js": "^8.4.0", "module-deps": "^3.7.3", diff --git a/share/html/assets/style.css b/share/html/assets/style.css index b15e039..525fb94 100644 --- a/share/html/assets/style.css +++ b/share/html/assets/style.css @@ -8,13 +8,16 @@ font-size:80%; } +.fade { + opacity:0.50; +} + .button-indent { padding: .25rem 1.5rem; font-size: 90%; } .section-indent { - padding-left: 1rem; border-left: 2px solid #eee; } diff --git a/share/html/section.hbs b/share/html/section.hbs index b1e3bc5..c44097b 100644 --- a/share/html/section.hbs +++ b/share/html/section.hbs @@ -1,4 +1,9 @@