You are on page 1of 4

ionic 2 Cheat Sheet

by JavaVolker via cheatography.com/25591/cs/10518/

Create Project Create Project (cont) Local Dev-Server (cont)

start Starts a new Ionic project in the [--ski​p- Skip npm package instal​lation [-- Specifies a path to open to
[options] specified PATH [options] any flags npm] bro​wse​rop​t (/#/ta​b/dash)
<PA​TH> for the command <PA​TH> io​n|-o]
[-- Create a basic structure without
[template] directory for the new project
no-​cor​dov​ Cordova requir​ements [--lab|-l] Test your apps on multiple
[template] Starter templates can
a|-w] screen sizes and platform types
either come from a named
[--sas​s|-s] Setup the project to use Sass [--nogulp] Disable running gulp during serve
template, (ex: tabs, sidemenu,
CSS precom​piling
blank), a Github repo, a Codepen [-- Start serve with a specific
url, or a local directory. Codepen [--lis​t|-l] List starter templates available pla​tfo​rm|-t] platform (ios/a​ndroid)
url, ex: [--io-​app- The Ionic.io app ID to use
http:/​/co​dep​en.i​o/​ion​ic/​pen​/odqCz id] Ionic Cloud
Defaults to Ionic "​tab​s" starter
[-- Project starter template io Integrate your app with Ionic Cloud
template
tem​pla​te|- <co​mm services <co​mma​nd> init
[-- Human readable name for the app t] a​nd>
app​nam​e| (Use quotes around the name)
[--v2|-v] Start a Ionic v2 project
-a]
Package
[--zip​- URL to download zipfile for starter
[--id|-i] Package name for <widget id>
fi​le|-z] template package Use Ionic Package to build your
config, ex:
com.my​com​pan​y.myapp <co​mma​n app <co​mma​nd> build android,
Local Dev-Server d> build ios, list, info, or download
[options]
serve Start a local develo​pment server
[options] for app dev/te​sting [-- (build <pl​atf​orm​>) Mark this build
rel​ease] as a release
[-- Print app console logs to Ionic
con​sol​elo​gs CLI [-- (build <pl​atf​orm​>) Specify the

|-c] pro​file|-p Security Profile to use with this


<ta​g>] build
[-- Print dev server logs to Ionic CLI
ser​ver​log​s|- [-- (build <pl​atf​orm​>) Do not generate

s] nor​eso​urc icon and splash screen resources


es] during this build
[--por​t|-p] Dev server HTTP port (8100
default) [-- (download) Specify the
des​tin​ati​o destin​ation directory to download
[-- Live Reload port (35729 default)
n|-d your packaged app.
liv​ere​loa​d-
<pa​th>]
p​ort|-r]

[-- Disable launching a browser Adding Stuff


nob​row​ser|-
b] add Add an Ion, bower component, or
[name] addon to the project [name] The name
[-- Do not start live reload
of the ion, bower component, or
nol​ive​rel​oad
addon you wish to install
|-d]

[-- Do not add proxies


nop​rox​y|-x]

[-- Use specific address or return


add​ress] with failure

[--all|-a] Have the server listen on all


addresses (0.0.0.0)

[-- Specifies the browser to use


bro​wse​r|-w] (safari, firefox, chrome)

By JavaVolker Published 24th January, 2017. Sponsored by CrosswordCheats.com


cheatography.com/javavolker/ Last updated 13th January, 2017. Learn to solve cryptic crosswords!
Page 1 of 4. http://crosswordcheats.com
ionic 2 Cheat Sheet
by JavaVolker via cheatography.com/25591/cs/10518/

Adding Stuff (cont) Project Setup Runnning the App

remove Remove an Ion, bower component, setup Configure the project with a build tool run Run an Ionic project on a
[name] or addon from the project [name] The [sass] (beta) [sass] Setup the project to use <PL​ATF​ORM> connected device
name of the Ion, bower component, Sass CSS precom​piling [options]
or addon you wish to remove
[--liv​ere​loa​d|-l] Live reload app dev files from
Scaffo​lding the device (beta)
Misc. Ionic Commands
generate Generate pages and components [--add​ress] Use specific address
list List Ions, bower compon​ents, or (liver​eload req.)
[--list] List available generators
addons in the project [--por​t|-p] Dev server HTTP port (8100
[-- Create test spec basic to pages,
info List inform​ation about the users default, livereload req.)
inc​lud​eS compon​ents, direct​ives, pipes and
runtime enviro​nment [-- Print app console logs to
pec] providers
help Provides help for a certain con​sol​elo​gs|-c] Ionic CLI (liver​eload req.)
[-- Not create scss for components
[command] command [command] The [--ser​ver​log​s|- Print dev server logs to Ionic
ski​pScss and pages
command you desire help with s] CLI (liver​eload req.)
]
hooks Manage your Ionic Cordova [-- Path directory target is created [--deb​ug|​--r​elease]
[add|r​emo​v hooks com​pon​e component [--dev​ice​|--​emu​lat​or|​--t​arg​et=FOO]
e|​per​mis​si [add|r​emo​ve|​per​mis​sio​ns|​perm]
nt​sDir]
o​ns|​perm] Add, remove, or modify
[-- Path directory target is created Emulating the App
permis​sions on the default Ionic
dir​ect​ive​ directive
Cordova hooks emulate Emulate an Ionic project on
sDir]
<PL​ATF​ORM> a simulator or emulator
Linking App-ID to Project [-- Path directory target is created
[options]
pag​esDir page
link Sets your Ionic App ID for your project [--liv​ere​loa​d|-l] Live reload app dev files
]
[appId] [appId] The app ID you wish to set for from the device (beta)
[-- Path directory target is created pipe
this project [--add​ress] Use specific address
pip​esDir]
[-- This will reset the Ionic App ID (liver​eload req.)
[-- Path directory target is created
res​et|- [--por​t|-p] Dev server HTTP port
pro​vid​ers provider
r] (8100 default, livereload
Dir]
req.)
[-- Path directory templates custom to
[--con​sol​elo​gs|- Print app console logs to
tem​pla​te pages, compon​ents, direct​ives,
c] Ionic CLI (liver​eload req.)
Dir] pipes and providers
[--ser​ver​log​s|-s] Print dev server logs to
Platform Stuff Ionic CLI (liver​eload req.)

[--deb​ug|​--r​elease]
platform Add platform target for
<PL​ATF​ORM> building an Ionic app [--dev​ice​|--​emu​lat​or|​--t​arg​et=FOO]
[options]

[-- Do not add default Ionic Push

nor​eso​urc​es|-r] icons and splash screen push Upload APNS and GCM
resources creden​tials to Ionic Push
[--nos​ave|-e] Do not save the platform to [--ios​- Upload your develo​pment .p12 file
the packag​e.json file de​v-cert] to Ionic Push

[--ios​- Upload your production .p12 file to


pr​od-​cert] Ionic Push

By JavaVolker Published 24th January, 2017. Sponsored by CrosswordCheats.com


cheatography.com/javavolker/ Last updated 13th January, 2017. Learn to solve cryptic crosswords!
Page 2 of 4. http://crosswordcheats.com
ionic 2 Cheat Sheet
by JavaVolker via cheatography.com/25591/cs/10518/

Push (cont) Building Stuff Uploading

[--pro​duc​tio​n- Tell Ionic Push to use build Build (prepare + compile) an upload Upload an app to your Ionic
m​ode​=y,n] production (y) or sandbox (n) <PL​ATF​ORM Ionic project for a given account
APNS servers > [options] platform.
[--ema​il|-e] Ionic account email
[--goo​gle​-ap​i- Set your app's GCM API key [--noh​ook​s|- Do not add default Ionic hooks [-- Ionic account password
key on Ionic Push n] for Cordova pas​swo​rd|-
<yo​ur-​gcm​-ap​i- p]
k​ey>] Plugins
[--note] The note to signify the upload
plugin Add a Cordova plugin <SP​EC> Can [--deploy Deploys the upload to the given
App Config​uration
add be a plugin ID, a local path, or a git <ch​ann​el_​t channel. Defaults to the Dev
config Set config​uration variables for [options] URL. ag​>] channel
<co​mma​nd your ionic app <co​mma​nd> set, <SP​EC
> [key] unset, build, or info >
Sharing
[value] [-- When looking up plugins by ID, look
share Share an app with a client, co-worker,
[key] The key to set sea​rchp in this directory and subdir​ect​ories
<EM​‐ friend, or customer <EM​AIL> The email
[value] The value to set ath first for the plugin before looking it
AIL> to share the app with
<di​rec​to up in the registry.

Save and Restore App. State r​y>]


Ionic Library
[-- Do not save the plugin to the
state Saves or restores state of your Ionic
nos​ave|- packag​e.json file lib Gets Ionic library version or updates
<CO​M Applic​ation using the packag​e.json
e] [options] the Ionic library. [update] Updates
MA​ND> file <CO​MMA​ND> [ save | restore |
[update] the Ionic Framework in
clear | reset ]
Resources www/li​b/ionic
[save] Save the platforms and plugins into
[-- Specific Ionic version Otherwise it
packag​e.json resources Automa​tically create icon and
ver​sio​n|- defaults to the latest version
splash screen resources (beta)
[restore] Restore the platforms and plugins v]
from packag​e.json [--ico​n|-i] Generate icon resources

[clear] Clear the packag​e.json of [-- Generate splash screen resources Ionic Login
cordov​aPl​ugins and spl​ash|-s]
login Login to your Ionic account
cordov​aPl​atf​orms, as well as clear
Put your images in the ./reso​urces directory,
out the platforms and plugins folders [--ema​il|-e] Ionic account email
named splash or icon.
[reset] Clear out the platforms and plugins Accepted file types are .png, .ai, and .psd. [--pas​swo​rd|-p] Ionic account password
direct​ories, and reinstall plugins and Icons should be 192x192 px without rounded
platforms corners.

[-- Only do operations with plugins Splash​screens should be 2208x2208 px, with

plu​gins] the image centered in the middle.

[-- Only do operations with platforms


pla​tform
s]

By JavaVolker Published 24th January, 2017. Sponsored by CrosswordCheats.com


cheatography.com/javavolker/ Last updated 13th January, 2017. Learn to solve cryptic crosswords!
Page 3 of 4. http://crosswordcheats.com
ionic 2 Cheat Sheet
by JavaVolker via cheatography.com/25591/cs/10518/

Security Ionic Docume​ntation

security Store your app's creden​tials for the docs Opens up the docume​ntation for Ionic
<co​mma​ Ionic Cloud <co​mma​nd> profiles list, <TO​P
nd> profiles add "​<na​me>​", creden​tials IC>
[options] android, or creden​tials ios
<TO​PIC> the topic to view help
[--profile (crede​ntials <pl​atf​orm​>) Specify the docume​ntation for. Use "​ls" to view all
<ta​g>] profile on which these creden​tials topics
are saved

[-- (crede​ntials android) Specify the


key​sto​re| location of your keystore file
-s
<pa​th>]

[-- (crede​ntials android) Specify your


key​sto​re keystore password (exclude for
-​pas​swo​ prompt)
rd|-p
<pa​ssw​o
rd​>]

[--key​- (crede​ntials android) Specify your


al​ias|-k key alias for this app
<al​ias​>]

[--key​- (crede​ntials android) Specify your


pa​ssw​or key password for this app (exclude
d|-w for prompt)
<pa​ssw​o
rd​>]

[--cert|-c (crede​ntials ios) Specify the location


<pa​th>] of your .p12 file

[--cer​t- (crede​ntials ios) Specify your


p​ass​wor certif​icate password (exclude for
d|-p prompt)
<pa​ssw​o
rd​>]

[-- (crede​ntials ios) Specify the location


pro​vis​ion​ of your .mobil​epr​ovision file
ing​-
pr​ofi​le|-r
<pa​th>]

By JavaVolker Published 24th January, 2017. Sponsored by CrosswordCheats.com


cheatography.com/javavolker/ Last updated 13th January, 2017. Learn to solve cryptic crosswords!
Page 4 of 4. http://crosswordcheats.com

You might also like