Skip to content

Commit

Permalink
Drop "default stdin" behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriangalliat committed Jan 30, 2015
1 parent 133057d commit 47a8b29
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ lint: .jshintrc
test: test/data/expected.stream.json dist
$(MOCHA) test/**/*.test.js
$(SASSDOC) --parse test/data/test.scss | diff - test/data/expected.json
$(SASSDOC) --parse < test/data/test.scss | diff - test/data/expected.stream.json
rm -rf sassdoc && $(SASSDOC) test/data/test.scss && [ -d sassdoc ]
rm -rf sassdoc && $(SASSDOC) < test/data/test.scss && [ -d sassdoc ]

test/data/expected.stream.json: test/data/expected.json
test/data/stream $< > $@
Expand Down
6 changes: 1 addition & 5 deletions src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ Options:
`;

const docopt = require('docopt').docopt;
const source = require('vinyl-source-stream');
const pkg = require('../package.json');
const Environment = require('./environment');
const Logger = require('./logger');
Expand Down Expand Up @@ -70,10 +69,7 @@ export default function cli(argv = process.argv.slice(2)) {
}

if (!options['<src>'].length) {
return process.stdin
.pipe(source())
.pipe(handler(env))
.on('data', cb);
return env.on('error', new errors.SassDocError('Expecting at least one `<src>`.'));
}

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

0 comments on commit 47a8b29

Please sign in to comment.