Sumith Jose
Sumith Jose

Reputation: 69

How to build multiple apps in angular 7 project in a single build command?

Now i need to specify each application name individually in "ng build" to build each app in angular 7 project (eg. ng build Myfirstapp, ng build MySecondApp).

I need to build all apps in a single build command (using "ng build" only builded the app name specified in "defaultProject" in angular.json).

How to do that?

Upvotes: 2

Views: 1888

Answers (1)

Felix Lemke
Felix Lemke

Reputation: 6488

You can define a script in your package.json file that runs all ng builds, e.g.

"scripts": {
  "build": "ng build Myfirstapp && ng build MySecondApp"
}

Then simply run

npm run build

Upvotes: 4

Related Questions