csnover / js-doc-parse

An experimental library for parsing JavaScript files and extracting inline documentation.
31 stars 7 forks source link

dynamic AMD require #89

Open arodbar opened 10 years ago

arodbar commented 10 years ago

I have a problem when I use a dynamic "require" into function. For example:

function( key){
    if (!result.service) {
        require(["app/models/" + key], function(StaticDataModel) {
            ...
       }
    }
}

where "key" it is a String argument of my function.

The error that is displayed on screen is:

"Error: ENOENT, no such file or directory 'path\app\models\undefined.js'"

I tried to put this file into the exclude files list but it is important that this file is into the documentation. I also tried to put the 'undefined.js' into that list but without any result.

I would like if you could guide me to how resolve this problem.