Skip to content

Commit

Permalink
Default to ./ when no <src>
Browse files Browse the repository at this point in the history
* See #347
  • Loading branch information
valeriangalliat committed Jan 30, 2015
1 parent 6c605dd commit 9db90d6
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ const errors = require('./errors');

export default function cli(argv = process.argv.slice(2)) {
let options = docopt(doc, { version: pkg.version, argv: argv });

if (!options['-'] && !options['<src>'].length) {
// Trigger help display.
docopt(doc, { version: pkg.version, argv: ['--help'] });
}

let logger = new Logger(options['--verbose'], options['--debug'] || process.env.SASSDOC_DEBUG);
let env = new Environment(logger, options['--strict']);

Expand Down Expand Up @@ -83,6 +77,10 @@ export default function cli(argv = process.argv.slice(2)) {
.on('data', cb);
}

if (!options['<src>'].length) {
options['<src>'].push('.');
}

handler(options['<src>'], env).then(cb);
}

Expand Down

0 comments on commit 9db90d6

Please sign in to comment.