dmy / elm-doc-preview

Elm offline documentation previewer

Home Page:https://www.npmjs.com/package/elm-doc-preview

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

modules not shown

jxxcarlson opened this issue · comments

Hi, I've been running elm-doc-preview on this project. The READEM.md file shows up, but no documentation for modules -- they are not listed in the usual place on the right. Attached is my elm.json file, and below that is the output edp -d. Thanks!

{
    "type": "package",
    "name": "jxxcarlson/minilatex-b",
    "summary": "Compile MiniLaTeX to Html",
    "license": "MIT",
    "version": "1.0.0",
    "exposed-modules": [
        "Compiler.LaTeXData"
    ],
    "elm-version": "0.19.0 <= v < 0.20.0",
    "dependencies": {
        "elm/core": "1.0.0 <= v < 2.0.0",
        "elm/html": "1.0.0 <= v < 2.0.0",
        "elm/json": "1.1.3 <= v < 2.0.0",
        "elm/parser": "1.1.0 <= v < 2.0.0",
        "elm-community/list-extra": "8.3.0 <= v < 9.0.0",
        "elm-community/maybe-extra": "5.2.0 <= v < 6.0.0",
        "elm-explorations/test": "1.2.2 <= v < 2.0.0",
        "folkertdev/elm-paragraph": "1.0.0 <= v < 2.0.0"
    },
    "test-dependencies": {}
}

Terminal session:

➜  minilatex-b git:(master) edp -d
elm-doc-preview 5.0.5 using elm 0.19.1
Previewing jxxcarlson/minilatex-b 1.0.0 from /Users/carlson/dev/brilliant/minilatex-b
Browse <http://localhost:8000> to see your documentation
  |> watching package
{
  '/Users/carlson/dev/brilliant/minilatex-b': [ 'README.md', 'elm-tooling.json', 'elm.json' ],
  '/Users/carlson/dev/brilliant/minilatex-b/src': [ 'CommandInterpreter.elm', 'Utility.elm' ],
  '/Users/carlson/dev/brilliant/minilatex-b/src/Render': [ 'LaTeXState.elm', 'Render.elm' ],
  '/Users/carlson/dev/brilliant/minilatex-b/src/Parser': [
    'Block.elm',
    'Document.elm',
    'Expression.elm',
    'Helpers.elm',
    'Parser.elm',
    'Problem.elm',
    'TestData.elm',
    'TestHelper.elm',
    'TextCursor.elm'
  ],
  '/Users/carlson/dev/brilliant/minilatex-b/src/Compiler': [ 'Differ.elm', 'GenericDiffer.elm', 'LaTeXData.elm' ]
}
  |> ::1 connected
  |> building /Users/carlson/dev/brilliant/minilatex-b documentation
  |> generating /var/folders/ml/vl09g4313rb1jd6y9zvcd6200000gn/T/elm-docs-23433a7OntyQNkWYi.json documentation

Error should be displayed in the browser, but in case they are not, could you try running last version (5.0.5) with -o docs.json option? This should display errors in the terminal.

With --debug (or -d) option, the build directory is kept (here /Users/carlson/dev/brilliant/minilatex-b), so you can go inside and
run elm make --docs=docs.json manually to see the error.

Here, you problem is:

-- DOCS MISTAKE --------------------------------- src/Compiler/GenericDiffer.elm

I do not see `diff` in your module documentation, but it is in your `exposing`
list:

1| module Compiler.GenericDiffer exposing (DiffRecord, diff)
                                                       ^^^^
Add a line like `@docs diff` to your module documentation!

Note: See <https://elm-lang.org/0.19.1/docs> for more guidance on writing high
quality docs.

I will check why the error is not displayed by elm-doc-preview.

The error is not displayed by elm-doc-preview in the browser because you are missing a README.md.
Just add at least an empty README.md and you should see the errors.

This is not the expected behavior though, the error should be displayed even without a README.

It should be at the same place as the elm-application.json, so in app sub-directory.