I am working on an angular project created using @angular/cli 1.4.4. Now I have upgraded my @angular/cli to 1.4.7 . Now I am wondering , how should I be updating my project's package.json file. I did not find a decent way on the web so I just created an new test project using @angular/cli 1.4.7 and than used it's package.json file in the existing project. Do we have a decent/official way of upgrading package.json file after updating @angular/cli version ??
apparently, you are still a beginner and what you should understand is that @angular/cli
is a simple npm package as any other package you install from npm so after you update your angular cli globally:
npm install -g @angular/cli
simply run the following commands to update the @angular/cli package locally in your project:
npm uninstall --save-dev angular-cli
npm install --save-dev @angular/cli
Edit:
angular cli does not offer a way to update your npm packages associated with your project so your best bet is to install a tool like npm-check-updates which will check and update your outdated dependencies in your package.json file including @angular/cli package.
npm install -g npm-check-updates
ncu -u
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With