Ionic Common command-line explanations

Source: Internet
Author: User

Original link

Installing Ionic

NPM install-g Ionic

Update the files in the Www/lib/ionic directory, if there are bower in the project, this command will run Bower update Ionic, otherwise the files will be downloaded and replaced from the Cdn.

Ionic Lib Update

Create a project in which the template can be a built-in profile type: Blank/sidemenu/tabs (default) Three, or it can be a github address (this is called ionoic-starter), or Codepen starter address

Optional parameter:-a your_app_name-i com.yourcompany.youapp-w (do not use Cordova)

Ionic start Your_app_name [Template]

Launches a local server, opens in a browser, and monitors file changes to refresh the browser at any time.

Ionic serve [options]

Open the iOS and Andriod display screen in the browser

Ionic serve--lab

Indicates an external IP address that can be viewed by external users.

Ionic Serv--address 192.168.89.1

Add target Platform

Ionic Platform Add ios/android

Build a platform

Ionic Build Ios/android

Using the simulator to simulate iOS, this command is equivalent to: Ionic run iOS

Ionic emulate iOS [options]  //ionic run iOS [options]

Run the app using an emulator or device.

Options include the following:

-L//livereload, real-time refresh changes.
-c//console in print app
-S//console for printing equipment
-P//port of the specified device
-I//specify Livereload for the brush port
--debug//debug
--release//release


When in livereload mode, use R to restart the client, use G Your_url to jump to the specified URL, use C to start or close the console, use S to start or close the console of the device, and use Q to exit.

You can configure the folders to be monitored in the watchpatterns of the Ionic.project file in the home directory. Such as:

{  "name": "",  "app_id": "",  
}

Ionic will upload local resource files (which support PNG, PSD, and AI, the bigger the better) to its server for processing.

The local resource file is placed under the resources directory, and if it is a separate resource for a platform, it can be placed under the corresponding platform, such as Resources/android/icon.png.

This will automatically put the processed resources on the platform, not all platforms.

Ionic resources [--splash] [--icon]

The command uploads its own project to the Ionic server, which will have a project number when the upload is completed.

Install Ionic view app and log in with Ionic's account to view your project.

You can also go directly to the Ionic app website and download apps from other platforms.

Ionic upload

viewing system conditions

Ionic info

Android does not have a good browser performance, you can install a shell (crosswalk), which will install a chromium kernel.

Ionic browser Add Crosswalk

View the Available browser

Ionic Browser List

Remove the installed browser

Ionic browser revert Android/ios

Remove the platform and plug-ins first, and then install the platforms and plugins in the Package.json file.

Ionic State Reset

First look at the platform and save the name and Package.json under the Cordovaplatforms property.
Then view the Fetch.json file, save the Cordova Plugin registry, locally installed plug-ins, and remote plug-ins from github or remote HTTP URLs

Ionic State Save

Remove the platform and plug-ins first, and then reinstall them by following the platforms and plugins included in the Package.json file.

Ionic State Clear

Ionic Common command-line explanations

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.