diff --git a/bin/documentation.js b/bin/documentation.js index 232eeec..c2b472f 100755 --- a/bin/documentation.js +++ b/bin/documentation.js @@ -19,7 +19,8 @@ var yargs = require('yargs') .describe('lint', 'check output for common style and uniformity mistakes') - .describe('mdtemplate', 'markdown template: should be a file with Handlebars syntax') + .describe('t', 'specify a theme: this must be a valid theme module') + .alias('t', 'theme') .boolean('p') .describe('p', 'generate documentation tagged as private') @@ -29,17 +30,20 @@ var yargs = require('yargs') .describe('version', 'project version. by default, inferred from package.json') .boolean('shallow') - .describe('shallow', 'shallow mode turns off dependency resolution, only processing the specified files (or the main script specified in package.json)') + .describe('shallow', 'shallow mode turns off dependency resolution, ' + + 'only processing the specified files (or the main script specified in package.json)') .default('shallow', false) .boolean('polyglot') - .describe('polyglot', 'polyglot mode turns off dependency resolution and enables multi-language support. use this to document c++') + .describe('polyglot', 'polyglot mode turns off dependency resolution and ' + + 'enables multi-language support. use this to document c++') .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') + .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') @@ -76,7 +80,7 @@ try { var formatterOptions = { name: name, version: version, - mdtemplate: argv.mdtemplate + theme: argv.theme }; var formatter = documentation.formats[argv.f](formatterOptions); diff --git a/package.json b/package.json index 2f53eec..04d6ea6 100644 --- a/package.json +++ b/package.json @@ -67,6 +67,6 @@ }, "scripts": { "cover": "istanbul cover prova test/*.js test/lib/*.js test/streams/*.js --dir $CIRCLE_ARTIFACTS && coveralls < $CIRCLE_ARTIFACTS/lcov.info", - "test": "eslint --no-eslintrc -c .eslintrc lib streams index.js test/*.js test/streams/*.js && prova test/*.js test/lib/*.js test/streams/*.js" + "test": "eslint --no-eslintrc -c .eslintrc bin lib streams index.js test/*.js test/streams/*.js && prova test/*.js test/lib/*.js test/streams/*.js" } } diff --git a/streams/output/index.js b/streams/output/index.js index cad6b92..71d6f18 100644 --- a/streams/output/index.js +++ b/streams/output/index.js @@ -11,7 +11,7 @@ module.exports = { md: function (options) { options = options || {}; return markdown({ - template: options.mdtemplate, + theme: options.theme, name: options.name, version: options.version }); @@ -20,6 +20,7 @@ module.exports = { options = options || {}; return htmlOutput({ name: options.name, + theme: options.theme, version: options.version }); }