Closed tcql closed 12 years ago
I've just tested to create the documentation for a file in a directory named coffeescripts
, both at the root of the project and nested within a src
directory and it works fine.
Can you please run codo with the the debug option (--debug
or -d
) and post the stack trace? What are your command line args and/or .codoopts
content?
Closing since lack of response. Please reopen if issue still exists and you're interested in solving it.
I've got the same issue. Output without --debug:
$ codo ../../../libs/one-common/src/main/coffee
Cannot parse file /<path>/src/main/coffee/org/oneandone/one/strings/en.coffee: ENOENT, no such file or directory 'c/main/coffee/org/oneandone/one/strings/en.coffee'
[...]
Output with --debug:
$ codo --debug ../../../libs/one-common/src/main/coffee
/usr/local/lib/node_modules/codo/src/codo.coffee:167
throw error;
^
Error: ENOENT, no such file or directory 'c/main/coffee/org/oneandone/one/strings/en.coffee'
at Object.fs.openSync (fs.js:338:18)
at Object.fs.readFileSync (fs.js:182:15)
at Parser.module.exports.Parser.parseFile (/usr/local/lib/node_modules/codo/src/parser.coffee:31:28)
at module.exports.Codo.run (/usr/local/lib/node_modules/codo/src/codo.coffee:164:32)
at async.parallel (/usr/local/lib/node_modules/codo/node_modules/async/lib/async.js:476:17)
at async.forEach (/usr/local/lib/node_modules/codo/node_modules/async/lib/async.js:94:25)
at async.parallel (/usr/local/lib/node_modules/codo/node_modules/async/lib/async.js:473:21)
at module.exports.Codo.detectExtras (/usr/local/lib/node_modules/codo/src/codo.coffee:230:16)
at _filter (/usr/local/lib/node_modules/codo/node_modules/async/lib/async.js:236:13)
at async.forEach (/usr/local/lib/node_modules/codo/node_modules/async/lib/async.js:94:25)
Ah, I guess it's not because of 'coffee', but because the path given isn't in a subdirectory. The error is probably thrown there: https://github.com/netzpirat/codo/blob/v1.5.3/src/codo.coffee#L194
You need to compile it from your project root, as Codo tries to read the codo options file .codoopts
or tries to guess some projects settings if not found or specified.
When trying to document a file 'Handler.coffee' inside of a folder named 'coffeescripts', Codo returns