@@ -8,7 +8,6 @@ var fs = require('fs')
88var mfs = require ( 'more-fs' )
99var fileSet = require ( 'file-set' )
1010var Transform = require ( 'stream' ) . Transform
11- var walkBack = require ( 'walk-back' )
1211var cliOptions = require ( './cli-options' )
1312
1413/**
@@ -151,7 +150,7 @@ function OutputTransform (options) {
151150 this . _flush = function ( ) {
152151 try {
153152 this . json = applyOptions ( this . json , options )
154- } catch ( err ) {
153+ } catch ( err ) {
155154 err . message += ' [Problem parsing the JSON data output by jsdoc, input data: ' + this . json . toString ( ) . substr ( 0 , 100 ) + ']'
156155 return this . emit ( 'error' , err )
157156 }
@@ -168,20 +167,22 @@ Uses `publish.js` as a template and the [`plugins/parseHtml`](https://github.com
168167*/
169168function getJsdocOutput ( src , options , done ) {
170169 var jsdocTemplatePath = path . resolve ( __dirname , '..' , 'lib' )
171- var jsdocPath = walkBack (
172- path . join ( __dirname , '..' ) ,
173- path . join ( 'node_modules' , 'jsdoc-75lb' , 'jsdoc.js' )
174- )
170+ var jsdocPath = path . resolve ( __dirname , '../node_modules/.bin/jsdoc' )
175171
176- if ( ! jsdocPath ) {
177- throw Error ( 'jsdoc-parse: cannot find jsdoc' )
172+ if ( ! fs . existsSync ( jsdocPath ) ) {
173+ throw Error ( 'jsdoc-parse: cannot find jsdoc: ' + jsdocPath )
178174 }
179175 var args = [ jsdocPath , '--pedantic' , '-t' , jsdocTemplatePath ]
180176 if ( options . html ) {
181177 args = args . concat ( [
182178 '-c' ,
183179 path . resolve ( __dirname , 'conf.json' )
184180 ] )
181+ } else if ( options . conf ) {
182+ args = args . concat ( [
183+ '-c' ,
184+ path . resolve ( options . conf )
185+ ] )
185186 }
186187 args = args . concat ( src )
187188
0 commit comments