Skip to content

Issues getting amd-doc to run #1

@israels

Description

@israels

I have tried unsuccessfully to get the amddoc.compile() function to execute properly, as is shown in the readme. My generate-amddoc-node file looks exactly like the usage example, except for the config changes detailed below.

Here is the output I get when running via node:

C:\Source>node generate-amddoc-node.js
function bold() { [native code] }
===========================================================

Running jsdoc on 135 files (0 cached)...
undefined564131ms

Updating jsdoc caches for future runs...

C:\source\node_modules\grunt\lib\grunt\file.js:123
        throw grunt.task.taskError('Unable to create directory "' + subpath +
                         ^
Error
    at C:\source\node_modules\grunt\lib\util\task.js:47:25
    at Object.<anonymous> (C:\source\node_modules\grunt\lib\util\task.js:390:2)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Object.<anonymous> (C:\source\node_modules\grunt\lib\grunt\utils.js:17:14)
    at Module._compile (module.js:449:26)

There are several issues:

  1. amd-doc has grunt dependencies. If I run it just through node I get unexpected logged output
  2. Run time is almost 10 minutes. For 135 small files this seems extrememly long. Running directly via jsdoc to generate documentation takes under 10 seconds
  3. The program terminates prematurely. It creates a cache.json file (after 10 minutes), but does not produce any other output

The only config I have modified from the readme are the following values:

//files to process for documentation
include: '../src/js/**/*.js',

//directory to output generated HTML (default = 'doc/out')
out: '../staging/doc/amddoc/out',

//directory to store jsdoc cache (default = 'doc/cache')
cache: '../staging/doc/amddoc/cache',

//Commented Out
//github URL where source is available. the file path and line number of
//each documented variable will be added to this to make source links.
// repoview: 'https://github.com/zship/deferreds.js/blob/develop/',

//requirejs configuration object
//more: https://github.com/jrburke/r.js/blob/master/build/example.build.js
//amd-doc uses `basePath`, `paths`, and `packages` (all optional) to
//transform file names to AMD module names.
requirejs: {
    baseUrl: '../src/js',
    optimize: 'none',
    packages: [
    {  }
    ],
}

Note: I am using Node v0.8.9. Also, I couldn't install your package directly because the git protocol is blocked at my organization. I instead installed it manually using jsdoc 3.1.0. Not sure if that version has anything to do with it.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions