Ionic 3 – Syntax for ionic version 3

Ionic 3 CLI Syntax

Check the installed version of Node.js:
npm version

Check the installed version of Git:
git –version

Check ionic version Details:
ionic info

Check Java version:
java -version

Install Cordova:
npm install -g cordova ionic

Ionic Framework Installation:
npm install -g ionic

*****************************************************************
Create New App(Name: samApp)

Syntax:
ionic start [<name>] [<template>]
name ………………… The name of your project directory
template …………….. The starter template to use (e.g. blank, tabs; use –list to see all)

Examples:
    $ ionic start
    $ ionic start –list
    $ ionic start samApp blank
    $ ionic start samApp tabs –cordova
    $ ionic start samApp blank –type=ionic1

The Starter Ionic Template:
tabs …………… ionic-angular A starting project with a simple tabbed interface
blank ………….. ionic-angular A blank starter project
sidemenu ……….. ionic-angular A starting project with a side menu with navigation in the content area
super ………….. ionic-angular A starting project complete with pre-built pages, providers and best practices for Ionic development.
conference ……… ionic-angular A project that demonstrates a realworld application
tutorial ……….. ionic-angular A tutorial based project that goes along with the Ionic documentation
aws ……………. ionic-angular AWS Mobile Hub Starter
tabs …………… ionic1 A starting project for Ionic using a simple tabbed interface
blank ………….. ionic1 A blank starter project for Ionic
sidemenu ……….. ionic1 A starting project for Ionic using a side menu with navigation in the content area
maps …………… ionic1 An Ionic starter project using Google Maps and a side menu

*****************************************************************

Start a local dev server for app dev/testing:

ionic serve
Examples:
$ ionic serve -lcs
$ ionic serve –lab -lcs
More Details: http://ionicframework.com/docs/cli/serve/

Stop Ionic Serve

Ctrl + C

Manage Cordova platform targets:

Synopsis:
$ ionic cordova platform [<action>] [<platform>]
Examples
$ ionic cordova platform
$ ionic cordova platform add ios
$ ionic cordova platform add android
$ ionic cordova platform rm android

Generate pipes, components, pages, directives, providers, and tabs 

(ionic-angular >= 3.0.0)

Synopsis:
$ ionic generate [<type>] [<name>]
Examples:
$ ionic generate
$ ionic generate component
$ ionic generate directive
$ ionic generate page
$ ionic generate pipe
$ ionic generate provider
$ ionic generate tabs
$ ionic generate component foo
$ ionic generate page Login
$ ionic generate pipe MyFilterPipe

Manage Cordova plugins:

Synopsis:
$ ionic cordova plugin [<action>] [<plugin>]
Examples:
$ ionic cordova plugin
$ ionic cordova plugin add cordova-plugin-inappbrowser@latest
$ ionic cordova plugin add phonegap-plugin-push –variable SENDER_ID=XXXXX
$ ionic cordova plugin rm cordova-plugin-camera
More: http://ionicframework.com/docs/cli/cordova/plugin/


Automatically create icon and splash screen resources

Synopsis:
$ ionic cordova resources [<platform>]
Examples:
$ ionic cordova resources
$ ionic cordova resources ios
$ ionic cordova resources android
More: http://ionicframework.com/docs/cli/cordova/resources/


Build (prepare + compile) an Ionic project for a given platform

Synopsis:
$ ionic cordova build [<platform>]
Examples:
$ ionic cordova build ios
$ ionic cordova build ios –prod –release
$ ionic cordova build android
$ ionic cordova build android –prod –release


Login with your Ionic ID:

Synatx: ionic login [<email>] [<password>]
Example: ionic login [email protected] secret


Upload a new snapshot of your app:

Synopsis: $ ionic upload 
Examples:
$ ionic upload
$ ionic upload –deploy=dev
$ ionic upload –deploy=production –note=”add menu entry” –metadata='{“custom_data”:true}’

*****************************************************************

Ionic Publishing Part:** Click here

Remove Console:
$ ionic cordova plugin rm cordova-plugin-console

Production Release Builds: (To run or build your app for production, run)
ionic cordova build –release android

Release:
ionic cordova build –release android

*****************************************************************

Ionic Clear:
npm cache clear
npm cache clean -f
npm install npm -g

Ionic Update:

npm install -g cordova

npm install -g ionic@latest

Ionic Uninstall:
npm uninstall node

npm uninstall -g cordova
npm uninstall -g ionic

npm uninstall cordova ionic

*****************************************************************

More Details: http://ionicframework.com/docs/cli/

Leave a Reply