question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[FEATURE] support for multiple apps in angular CLI

See original GitHub issue
Overview of the issue

Hi, I have multiple apps in angular projects in angular CLI

src->
     app->
             app1
             app2

In my 2 tsconfig.app.json files app1.tsconfig.app.json app2.tsconfig.app.json I have excluded all files from app2 tsconfig in app1 tsconfig and vice versa.

   "exclude": [
     "test.ts",
     "**/*.spec.ts",
     "app/app1/*",
     "**/node_modules/*",
    
   ]

i can build the application separately with ng build --app 1 it excludes all files including html, ts, scss from app1

But when trying to the documentation compodoc excludes only first level files from both app1 and app2 it excludes app.modules.ts app.component.ts app.component.html app.component.scss

from both app1 and app2 even though the exclude says to exclude from app1 and it does not consider rest of the sub folders altogether

Operating System, Node.js, npm, compodoc version(s)

Compodoc: 1.0.9 Node.js version : v6.10.2 Operating system : Windows 7

Angular configuration, a package.json file in the root folder

app2.compodoc.tsconfig.app.json

{
    "extends": "../tsconfig.json",
    "compilerOptions": {
      "outDir": "../out-tsc/app",
      "module": "es2015",
      "baseUrl": "",
      "types": []
    },
    "exclude": [
      "test.ts",
      "**/*.spec.ts",
      "app/app1/*",
      "**/node_modules/*",
      "app1.main.ts"
    ]
  }

app1.compodoc.tsconfig.app.json

{
    "extends": "../tsconfig.json",
    "compilerOptions": {
      "outDir": "../out-tsc/app",
      "module": "es2015",
      "baseUrl": "",
      "types": []
    },
    "exclude": [
      "test.ts",
      "**/*.spec.ts",
      "app/app2/*",
      "**/node_modules/*",
      "app2.main.ts"
    ]
  }

package.json

{
  "name": "project",
  "version": "0.1.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build --prod",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e",
    "doc:buildApp1": "compodoc -p src/app1.compodoc.tsconfig.app.json -d ./App1-documentation",
    "doc:serveApp1": "compodoc -s -d ./app1-documentation",
    "doc:buildandserveApp1": "compodoc -p src/App1.compodoc.tsconfig.app.json -s -d ./App1-documentation",
    "doc:buildApp2": "compodoc -p src/App2.tsconfig.app.json -d ./App2-documentation",
    "doc:serveApp2": "compodoc -s -d ./App2-documentation",
    "doc:buildandserveApp2": "compodoc -p src/App2.tsconfig.app.json -s -d ./App2-documentation"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^5.2.8",
    "@angular/common": "^5.2.8",
    "@angular/compiler": "^5.2.8",
    "@angular/core": "^5.2.8",
    "@angular/forms": "^5.2.8",
    "@angular/http": "^5.2.8",
    "@angular/platform-browser": "^5.2.8",
    "@angular/platform-browser-dynamic": "^5.2.8",
    "@angular/router": "^5.2.8",
    "classlist.js": "^1.1.20150312",
    "core-js": "^2.5.3",
    "font-awesome": "4.7.0",
    "node-sass": "4.7.2",
    "rxjs": "5.5.6",
    "web-animations-js": "^2.3.1",
    "zone.js": "0.8.19"
  },
  "devDependencies": {
    "@angular/cli": "1.7.3",
    "@angular/compiler-cli": "^5.2.8",
    "@angular/language-service": "^5.2.8",
    "@compodoc/compodoc": "^1.0.9",
    "@types/jasmine": "~2.8.6",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "9.4.7",
    "codelyzer": "^4.2.1",
    "jasmine-core": "3.1.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~2.0.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^1.4.2",
    "karma-jasmine": "~1.1.1",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "5.3.0",
    "sass-loader": "6.0.6",
    "ts-node": "5.0.1",
    "tslint": "~5.9.1",
    "typescript": "2.6.1"
  }
}
Compodoc installed globally or locally ?

locally

Motivation for or Use Case

if multiple apps are present in the angular app then should be able to generate the documentation separately for different apps.

Reproduce the error

using Angular 5 create 2 apps in src/app folder each having its own app module, components and routing etc with their own tsconfig files under src, excluding other app files from each other and try to generate documentation

Related issues

#175

Suggest a Fix

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
listepo-alterpostcommented, Mar 14, 2018

+1, we using nrwl and has this problem

0reactions
lock[bot]commented, Sep 30, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem. Why locking ? Having issues with the most up-to-date context.

Read more comments on GitHub >

github_iconTop Results From Across the Web

handling multiple applications with angular cli - Stack Overflow
For example i need to have two application with almost the same logic but the second app is just part of first with...
Read more >
Combining Multiple Angular Applications into a Single One
However, the multiple application functionality is now baked directly into the Angular CLI so this post will focus on that.
Read more >
Angular Workspaces: Multi-Application Projects - OctoPerf
How to create an Angular 8 project with multiple applications and libraries? This guide uses the Kraken Load Testing IDE front as an...
Read more >
Angular CLI: multiple apps in the same project - Yakov Fain
This should allow you to have multiple apps on the same HTML page as well. This feature should be available in the upcoming...
Read more >
Workspace and project file structure - Angular
Angular also supports workspaces with multiple projects. This type of development environment is suitable for advanced users who are developing shareable ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found