-
-
Notifications
You must be signed in to change notification settings - Fork 751
Description
It looks like v0.4 broke the --options option.
The error message is:
module.js:341
throw err;
^Error: Cannot find module 'config.js'
at Function.Module._resolveFilename (module.js:339:15)
at Function.Module._load (module.js:290:25)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at TypedocReader.load (/Users/phil/tmp/typedoctest/node_modules/typedoc/lib/utils/options/readers/typedoc.js:43:20)
at TypedocReader.onDiscover (/Users/phil/tmp/typedoctest/node_modules/typedoc/lib/utils/options/readers/typedoc.js:29:18)
at /Users/phil/tmp/typedoctest/node_modules/typedoc/lib/utils/events.js:256:33
at triggerApi (/Users/phil/tmp/typedoctest/node_modules/typedoc/lib/utils/events.js:106:13)
at Options.EventDispatcher.trigger (/Users/phil/tmp/typedoctest/node_modules/typedoc/lib/utils/events.js:250:13)
at Options.read (/Users/phil/tmp/typedoctest/node_modules/typedoc/lib/utils/options/options.js:72:14)
Steps to reproduce:
mkdir -p typedoctest/srccd typedoctesttouch src/test.tsnpm install typedocecho "module.exports = { out: 'docs' }" > config.jsnode_modules/.bin/typedoc --options config.js src
When you look into typedoc/lib/utils/options/readers/typedoc.js:43 you see, that the file can be found, but not required. Manually requiring the file in a REPL works (node -e "console.log( require('./config.js') );").
The same test works with version 0.3.12. I'm using Mac OS 10.11.4 and tried node 5.9.1 and 6.2.0.