Custom path for the file path angular-cli.json?

advertisements

Can we provide the path for angular-cli.json to ng build, right now it doesn't seem to be supported.

Update:

What i am looking for is if we can have multiple angular-cli.json file with different name and that can be fed to ng build command something like

ng build --path\--config angular-cli-123.json


Multiple apps are now supported out of the box.

Angular CLI support multiple applications within one project. You use the apps array in .angular-cli.json to list files and folders you want to use for different apps.

"apps": [
  {
    "root": "src",
    ...
    "main": "main.ts",
    "polyfills": "polyfills.ts",
    "test": "test.ts",
    "tsconfig": "tsconfig.app.json",
    "testTsconfig": "tsconfig.spec.json",
    "prefix": "app",
    ...
  },
  {
    "root": "src",
    ...
    "main": "main2.ts",
    "polyfills": "polyfills2.ts",
    "test": "test2.ts",
    "tsconfig": "tsconfig.app.json",
    "testTsconfig": "tsconfig.spec.json",
    "prefix": "app2",
    ...
  }
]

To serve the first app: ng serve --app=0 or ng serve --app 0

To serve the second app: ng serve --app=1 or ng serve --app 1

Hope it helps, someone!!