Is there a method to separate dependencies object from package.json file of an angular project?

Viewed 306

Here is the scenario I have multiple angular applications which belong to the same project. When I needed to upgrade an npm package, I need to change all the package.json files in each application. I tried mono repo, but it does not apply to my project because npm scripts are not the same as all apps.

So I want to separate the node dependencies from applications and keep npm scripts of the package.json files.

Is there a way to separate only the dependencies object from the package.json file? OR any other suggestions?

2 Answers

Unfortunately npm do not support package.json inheritance. See this link.

On the other side why don't you customize your npm scripts? create alias for every npm command. e.g.

"test-app1": "ng test app1",
"test-app2": "ng test app2 --code-coverage --no-watch --no-progress --browsers ChromeHeadlessNoSandbox",
Related