Skip to content

Commit a429d62

Browse files
Drop "default stdin" behavior
* See #347 (comment)
1 parent 133057d commit a429d62

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

Makefile

-2
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ lint: .jshintrc
2424
test: test/data/expected.stream.json dist
2525
$(MOCHA) test/**/*.test.js
2626
$(SASSDOC) --parse test/data/test.scss | diff - test/data/expected.json
27-
$(SASSDOC) --parse < test/data/test.scss | diff - test/data/expected.stream.json
2827
rm -rf sassdoc && $(SASSDOC) test/data/test.scss && [ -d sassdoc ]
29-
rm -rf sassdoc && $(SASSDOC) < test/data/test.scss && [ -d sassdoc ]
3028

3129
test/data/expected.stream.json: test/data/expected.json
3230
test/data/stream $< > $@

src/cli.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ Options:
2020
`;
2121

2222
const docopt = require('docopt').docopt;
23-
const source = require('vinyl-source-stream');
2423
const pkg = require('../package.json');
2524
const Environment = require('./environment');
2625
const Logger = require('./logger');
@@ -70,10 +69,7 @@ export default function cli(argv = process.argv.slice(2)) {
7069
}
7170

7271
if (!options['<src>'].length) {
73-
return process.stdin
74-
.pipe(source())
75-
.pipe(handler(env))
76-
.on('data', cb);
72+
return env.emit('error', new errors.SassDocError('Expecting at least one `<src>`.'));
7773
}
7874

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

0 commit comments

Comments
 (0)