0

I have the following npm scipt:

ng build core --configuration production && ng build module-one --configuration production && ng build module-two --configuration production && ng build module-three --configuration production && ng build module-four --configuration production && ng build automate --configuration production && ng build store --configuration production",

I tried to add the skipping char \ before a line break but it breaks the code:

ng build core --configuration production && ng build module-one --configuration production && \
ng build module-two --configuration production && ng build module-three --configuration production && \
ng build module-four --configuration production && ng build automate --configuration production && \
ng build store --configuration production"

This is a styling choice to improve code readability, without functional difference.

André
  • 1,602
  • 2
  • 12
  • 26

1 Answers1

0

The short answer is: not possible, because .json doesn't support skiping of line breaks. However, there are some ways of improving readability.
One of them is to break the script into smaller scripts and chain them in another script:

"scripts": {
  "bCore": "ng build core --configuration production",
  "bOne": "ng build module-one --configuration production",
  "bTwo": "ng build module-two --configuration production",
  "bThree: "ng build module-three --configuration production",
  "bFour": "ng build module-four --configuration production",
  "bAutomate": "ng build automate --configuration production",
  "bStore": "ng build store --configuration production",
  "build" : "npm run bCore && npm run bOne && npm run bTwo && npm run bThree && npm run bFour && npm run bAutomate && npm run bStore"
}
André
  • 1,602
  • 2
  • 12
  • 26