Skip to content

Commit 5757397

Browse files
committed
another Windows workaround
1 parent bb56d8a commit 5757397

3 files changed

Lines changed: 12 additions & 4 deletions

File tree

es5/jsdoc-parse.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ var fileSet = require('file-set');
1212
var Transform = require('stream').Transform;
1313
var cliOptions = require('./cli-options');
1414
var getTempPath = require('temp-path');
15+
var walkBack = require('walk-back');
1516

1617
function tempPath() {
1718
return getTempPath() + 'jsdoc-parse.js';
@@ -117,7 +118,7 @@ util.inherits(OutputTransform, Transform);
117118

118119
function getJsdocOutput(src, options, done) {
119120
var jsdocTemplatePath = __dirname;
120-
var jsdocPath = path.resolve(__dirname, '../node_modules/.bin/jsdoc');
121+
var jsdocPath = walkBack(path.join(__dirname, '..'), path.join('node_modules', 'jsdoc-75lb', 'jsdoc.js'));
121122

122123
if (!fs.existsSync(jsdocPath)) {
123124
throw Error('jsdoc-parse: cannot find jsdoc: ' + jsdocPath);

lib/jsdoc-parse.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const fileSet = require('file-set')
99
const Transform = require('stream').Transform
1010
const cliOptions = require('./cli-options')
1111
const getTempPath = require('temp-path')
12+
const walkBack = require('walk-back')
1213

1314
function tempPath () {
1415
return getTempPath() + 'jsdoc-parse.js'
@@ -173,7 +174,10 @@ util.inherits(OutputTransform, Transform)
173174
*/
174175
function getJsdocOutput (src, options, done) {
175176
var jsdocTemplatePath = __dirname
176-
var jsdocPath = path.resolve(__dirname, '../node_modules/.bin/jsdoc')
177+
var jsdocPath = walkBack(
178+
path.join(__dirname, '..'),
179+
path.join('node_modules', 'jsdoc-75lb', 'jsdoc.js')
180+
)
177181

178182
if (!fs.existsSync(jsdocPath)) {
179183
throw Error('jsdoc-parse: cannot find jsdoc: ' + jsdocPath)

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,18 @@
3232
"file-set": "~0.2.1",
3333
"jsdoc-75lb": "^3.4.1",
3434
"object-tools": "^2",
35-
"temp-path": "^1.0.0"
35+
"temp-path": "^1.0.0",
36+
"walk-back": "^1.0.1"
3637
},
3738
"devDependencies": {
3839
"babel-preset-es2015": "^6.3.13",
3940
"tape": "^4"
4041
},
4142
"standard": {
4243
"ignore": [
43-
"test", "es5", "example"
44+
"test",
45+
"es5",
46+
"example"
4447
]
4548
}
4649
}

0 commit comments

Comments
 (0)