We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ade4f34 commit 9753f54Copy full SHA for 9753f54
bin/documentation.js
@@ -46,15 +46,19 @@ function parseArgs() {
46
options.access = (options.access || ['public', 'undefined', 'protected']).concat(['private']);
47
}
48
49
- if (inputs.length == 0) {
50
- try {
51
- var p = require(path.resolve('package.json'));
52
- options.package = p;
+ try {
+ var p = require(path.resolve('package.json'));
+ options.package = p;
+ if (inputs.length == 0) {
53
inputs = [p.main || 'index.js'];
54
- } catch (e) {
55
- yargs.showHelp();
56
- throw new Error('documentation was given no files and was not run in a module directory');
57
+ } catch (e) {
+
+ }
58
59
60
+ yargs.showHelp();
61
+ throw new Error('documentation was given no files and was not run in a module directory');
62
63
64
return {
0 commit comments