jleyba / js-dossier

A JavaScript documentation generation tool.
Apache License 2.0
150 stars 15 forks source link

Dossier not generating docs when "excludes" are specified #96

Open myphysicslab opened 7 years ago

myphysicslab commented 7 years ago

After updating to current Dossier (which also required updating to bazel 0.4) I am not getting any documentation (other than the readMe) being generated by Dossier.

Here is what I see when running Dossier:

[11:54:19 ~/Documents/Programming/myphysicslab]$ make docs
java -jar ../js-dossier/bazel-bin/src/java/com/github/jsdossier/dossier_deploy.jar -c dossier_config.json
Generating documentation...
Ignoring undeclared namespace goog
Finished in 2.075s

Here is my current config.json:

{
    "output": "docs",
    "sources": [
        "src/lab",
        "src/sims",
        "src/test"
    ],
    "closureLibraryDir": "closure-library/closure/goog",
    "readme": "src/docs/doc_start.md",
    "typeFilters": [
        ".*\\.i18n",
        "myphysicslab.lab.util.Terminal.regexPair"
    ],
    "excludes": [
        "closure-library/closure/goog/html",
        "closure-library/closure/goog/testing",
        "src/lab/engine2D/test",
        "src/lab/model/test",
        "src/lab/util/test",
        "src/lab/view/test",
        "src/sims/pendulum/test",
        "src/sims/roller/test",
        "src/sims/springs/test"
    ]
}

The readme file is being processed, when I open the resulting index.html it has the contents of the readme, but no other doc files are created.

Probably the Ignoring undeclared namespace goog is a clue, but I don't know where to go with that. I haven't changed the location of the closure-library. This was all working fine until I updated Dossier to the latest version... it was probably the Dossier version from Oct 2016.

myphysicslab commented 7 years ago

The problem only occurs when I have "excludes". This happens either with config.json or by using the configuration flags.

Removing the "excludes" from the above config.json produces the documentation (of course the files I wish to exclude are also produced).

Similar result when using configuration flags. The following produces some docs:

java -jar $(DOSSIER) --source "src/lab/util/*.js" --output docs2 
--closure_library_dir `readlink closure-library`/closure/goog

But this produces no docs:

java -jar $(DOSSIER) --source "src/lab/util/*.js" --output docs2 
--closure_library_dir `readlink closure-library`/closure/goog --exclude "src/lab/util/test"