官术网_书友最值得收藏!

Installing Cordova and Ionic CLI

Finally, to complete the Ionic 2 setup, we will install the Ionic and Cordova CLI. Ionic CLI is a wrapper around the Cordova CLI with some additional features.

All the code examples in this book use Cordova version 6.4.0, Ionic CLI version 2.1.14, and Ionic version 2.1.17. But the same should work with latest version of Ionic as well.

To install the Ionic CLI, run the following command:

npm install -g ionic cordova

To verify the install, run the following command:

cordova -v
> 6.4.0

You can also run this command:

ionic -v
> 2.1.14

You can run the following command to get the complete information regarding the Ionic setup:

ionic info

Your system information:
Cordova CLI: 6.4.0
Ionic CLI Version: 2.1.14
Ionic App Lib Version: 2.1.7
ios-deploy version: 1.8.4
ios-sim version: 5.0.6
OS: macOS Sierra
Node Version: v6.10.1
Xcode version: Xcode 8.3 Build version 8E162

If you see an Ionic CLI version greater than or equal to 2.2.2, you have an Ionic CLI that can work with Ionic 3 apps. Nonetheless, the commands and examples in this book will work the same way.

To get a feel of what Ionic CLI is packed with, run the following:

 ionic

We should see a list of tasks, as seen in the following screenshot:

There are a few more tasks apart from the ones seen in the preceding screenshot.

We can read through the tasks and explanations to get an idea about what they do. Also, note that some of the tasks are still in beta, as of today.

With this, we have completed the installation of all the software needed to develop apps using Ionic.

主站蜘蛛池模板: 潢川县| 枝江市| 板桥市| 黄石市| 山东省| 高唐县| 昌乐县| 康乐县| 左权县| 大兴区| 南充市| 黄冈市| 西乌珠穆沁旗| 准格尔旗| 通道| 筠连县| 东海县| 贵阳市| 宣化县| 潜山县| 东兰县| 凉城县| 瑞昌市| 吉隆县| 滦平县| 怀安县| 锡林郭勒盟| 岑巩县| 星座| 中牟县| 榕江县| 钦州市| 洱源县| 桃园市| 册亨县| 萨迦县| 华容县| 龙里县| 宜昌市| 穆棱市| 黄梅县|