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

Issue

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?

Solution

If I understood well this could not be done with npm but seems like it can be achieved with yarn workspaces:

Guide for installing yarn:

Leave a Reply

(*) Required, Your email will not be published