Upgrading to Ionic CLI 3
In this post we will give you information about Upgrading to Ionic CLI 3. Hear we will give you detail about Upgrading to Ionic CLI 3And how to use it also give you demo for it if it is necessary.
If you’ve done it yet ,you should upgrate to version 3 of Ionic CLI which contains many changes and improvementssuch as the install speed ,better help documentation and interactive commands so if you usually forget how to use the commands ,the new CLI will help you use them .
This upgrade will change the way you use the CLI because some commands have been removed and some other commands have been changed ,but it’s really worth it .
So to get started ,open you command prompt or terminal and type :
npm uninstall -g ionic
This will uninstall the current installed version of the Ionic CLI .
Next run the following to install Ionic CLI v3
npm install -g ionic@latest
You need also to install the new CLI inside your current project if you are working on a project generated with the previous CLI version
Inside an Ionic 1 project ,execute
npm install --save-dev @ionic/cli-plugin-ionic1@latest npm install --save-dev @ionic/cli-plugin-cordova@latest
Inside an Ionic 2 / Ionic 3 ,execute
npm install --save-dev @ionic/cli-plugin-ionic-angular@latestnpm install --save-dev @ionic/cli-plugin-cordova@latest
After installing the Ionic CLI v3 ,you can verify the versions of installed components by running
ionic info
I’m getting :
global packages: @ionic/cli-utils : 1.0.0 Ionic CLI : 3.0.0System: Node : v7.9.0 OS : Linux 4.2 Xcode : not installed ios-deploy : not installed ios-sim : not installed
Generating a new project with Ionic CLI v3
Lets use the new CLI to generate a new Ionic project .GO ahead and run
ionic start hellocli3 blank
When the CLI finishes ,navigate inside the project and run ionic info
cd hellocli3ionic info
You should get something like
global packages: @ionic/cli-utils : 1.0.0 Cordova CLI : 6.5.0 Ionic CLI : 3.0.0local packages: @ionic/app-scripts : 1.3.7 @ionic/cli-plugin-cordova : 1.0.0 @ionic/cli-plugin-ionic-angular : 1.0.0 Ionic Framework : ionic-angular 3.2.1System: Node : v7.9.0 OS : Linux 4.2 Xcode : not installed ios-deploy : not installed ios-sim : not installed
You can also watch this video from Paul Halliday on Youtube
Conclusion
The Ionic CLI is getting better and smarter ,it also changes a little bit ,the way we are used to create projects and build them so it’s wise to upgrate now and start using and getting familiar with new CLI to get benefits from the new improvements .
Hope this code and post will helped you for implement Upgrading to Ionic CLI 3. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs