Skip to content

Commit 769df52

Browse files
committed
Replaced findPackagePath with findPackageFileInPath.
1 parent 1cf3661 commit 769df52

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

bin/doxdox

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,19 @@ while (args.length) {
103103

104104
}
105105

106+
if (!input.length) {
107+
108+
input = process.cwd();
109+
110+
}
111+
106112
if (pkg) {
107113

108-
pkg = utils.findPackagePath(pkg);
114+
pkg = utils.findPackageFileInPath(pkg);
109115

110116
} else {
111117

112-
pkg = utils.findPackagePath(input);
118+
pkg = utils.findPackageFileInPath(input);
113119

114120
}
115121

@@ -137,12 +143,6 @@ if (!config.title) {
137143

138144
}
139145

140-
if (!input.length) {
141-
142-
input = process.cwd();
143-
144-
}
145-
146146
doxdox.parseInput(input, config, pkg).then(function (content) {
147147

148148
if (output) {

lib/utils.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,17 @@ module.exports.buildWiki = function (input) {
127127

128128
};
129129

130-
module.exports.findPackagePath = function (input) {
130+
module.exports.findPackageFileInPath = function (input) {
131131

132132
var pkg,
133133
stat;
134134

135+
if (!input) {
136+
137+
input = process.cwd();
138+
139+
}
140+
135141
if (fs.existsSync(input)) {
136142

137143
stat = fs.statSync(input);

0 commit comments

Comments
 (0)