Closed duydnguyen07 closed 5 years ago
I had the same problem and changing the command argument lets compodoc run without error, BUT the documentation is missing everything except project metadata (no components, modules, routes etc.)
I got it working by moving the tsconfig.app.json
to the src
directory and modifying the paths like this:
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"types": []
},
"include": ["./**/*.ts"],
"exclude": ["./test.ts", "./**/*.spec.ts", "./**/*.mock.ts"]
}
With this, compodoc generates the full documentation as expected, although I can't guarantee that this change doesn't break something else. ng serve
still seems to work fine.
Thanks for the report, will look into it!
Found the bug, you just need to edit the compodoc script in package.json
to remove src/
from the path, as tsconfig.app.json
was moved to the root following the latest angular cli schematics.
I'm submitting a...
Current behavior
After the app was bootstrapped, run
npm run compodoc
and the following error will appear "src/tsconfig.app.json" file was not found in the current directoryExpected behavior
The run script should work out of the box
Minimal reproduction of the problem with instructions
Reproducing the problem with the following configuration using the
ngx new
command\ ./ / ____ ____ | ' \/ ` |> < |--< [] | |-: |=== | |||_, //°\\ ENTERPRISE APP STARTER -~*=> |___/ v7.0.2
? What is the name of your app? demo ? What kind of app do you want to create? (Press to select, to toggle all, to invert selection)Web app
? Do you want a progressive web app? (with manifest and service worker) Yes
? Which UI framework do you want? Angular Material (more website-oriented)
? Which kind of layout do you want? Simple responsive header bar (more website-oriented)
? Do you want authentication? No
? Do you want lazy loading? Yes
? Do you want analytics support (with Angulartics2)? No
? Do you want additional tools? Prettier (automatic code formatting), Hads (markdown-based doc system), Compodoc (Angular doc generator)
? Do you want additional libraries? Lodash (collection & general utilities)
Environment
Others:
When corrected the script to "compodoc -p tsconfig.app.json -d docs/generated -s -o", it worked.