-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error using v0.1.0 #36
Comments
Same here. Ran it on two files, undefined reference bomb outs on both... dox --debug < app.js /usr/local/lib/node_modules/dox/lib/dox.js:44 dox --debug < app-cluster.js /usr/local/lib/node_modules/dox/lib/dox.js:70 |
I'm getting the same error but with version 0.1.1 |
keep in mind the latest dox is a lot different, it's just a json representation of your docs now |
oh yeah totally, the same error is still occurring though |
here is an sample: agreco:src agreco$ dox < env.js > env.json /Users/agreco/local/node/lib/node_modules/dox/lib/dox.js:44 I'm using node 0.4.12 for context |
ah, ok cool, i'll have to get more test-cases and fix any formatting im not covering |
ideally we'd use a "proper" javascript parser and just pluck out the comments etc, it's a nice hack currently |
cool cool, cheers mate |
This error happens when there's a JavaScript snippet without a comment block before it. |
Following code illustrate this bug :
I suggest not to take into account the buffer in this case : dox.js :
|
Wow. Misclick on my part there. |
This Issue is still exisiting, Merged fix isn't in current branch. |
dox does now take the reasonable default of not including any code before the first comment, not sure if it's ideal, but probably good enough to close the issue? Or do we want the same behaviour as for a completely blank file, i.e. output a comment with no content to the comment and just the code + context? |
Seems to be outdated. |
/usr/local/lib/node_modules/dox/lib/dox.js:70
comment.code = code;
^
TypeError: Cannot set property 'code' of undefined
at Object.parseComments (/usr/local/lib/node_modules/dox/lib/dox.js:70:18)
at [object Object]. (/usr/local/lib/node_modules/dox/bin/dox:40:17)
at [object Object].emit (events.js:61:17)
at afterRead (fs.js:878:12)
at wrapper (fs.js:245:17)
For every file I try to process.
The text was updated successfully, but these errors were encountered: