Skip to content

Instantly share code, notes, and snippets.

@tlareg
Last active August 29, 2015 14:22
Show Gist options
  • Save tlareg/d19c1e21e220d11d8924 to your computer and use it in GitHub Desktop.
Save tlareg/d19c1e21e220d11d8924 to your computer and use it in GitHub Desktop.
# install globally cordova, ionic and gulp packages
npm install -g cordova ionic gulp
# ionic app generator; blank | tabs | sidemenu
ionic start myApp sidemenu
# setup project to use sass
cd myApp
ionic setup sass
# enable android platform
ionic platform add android
# install android sdk (or android studio with sdk) and set it in PATH
setx ANDROID_HOME "C:\Programy\Android\sdk"
setx PATH "%PATH%;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools"
# build app-name\platforms\android\build\outputs\apk\android-debug.apk
ionic build android
# develop in the browser with live reload
ionic serve
[--consolelogs|-c] ...... Print app console logs to Ionic CLI
[--serverlogs|-s] ....... Print dev server logs to Ionic CLI
[--port|-p] ............. Dev server HTTP port (8100 default)
[--livereload-port|-i] .. Live Reload port (35729 default)
[--nobrowser|-b] ........ Disable launching a browser
[--nolivereload|-r] ..... Do not start live reload
[--noproxy|-x] .......... Do not add proxies
# Run your app on a device
# adb devices - shows list of plugged devices
# make sure you have USB debugging enabled on your device
# instal phone usb drivers on computer
# http://developer.samsung.com/technical-doc/view.do?v=T000000117
# after plug in phone to usb, allow for debugging
ionic run android
[--livereload|-l] .... Live Reload app dev files from the device
[--consolelogs|-c] ... Print app console logs to Ionic CLI
[--serverlogs|-s] .... Print dev server logs to Ionic CLI
Your Ionic project is ready to go! Some quick tips:
* cd into your project: $ cd myApp
* Setup this project to use Sass: ionic setup sass
* Develop in the browser with live reload: ionic serve
* Add a platform (ios or Android): ionic platform add ios [android]
Note: iOS development requires OS X currently
See the Android Platform Guide for full Android installation instructions:
https://cordova.apache.org/docs/en/edge/guide_platforms_android_index.md.html
* Build your app: ionic build <PLATFORM>
* Simulate your app: ionic emulate <PLATFORM>
* Run your app on a device: ionic run <PLATFORM>
* Package an app using Ionic package service: ionic package <MODE> <PLATFORM>
For more help use ionic --help or ionic docs
Visit the Ionic docs: http://ionicframework.com/docs
Create an ionic.io account to use the Ionic View app and other features?
(Y/n): +---------------------------------------------------------+
+ New Ionic Updates for May 2015
+
+ The View App just landed. Preview your apps on any device
+ http://view.ionic.io
+
+ Invite anyone to preview and test your app
+ ionic share EMAIL
+
+ Generate splash screens and icons with ionic resource
+ http://ionicframework.com/blog/automating-icons-and-splash-screens/
+
+---------------------------------------------------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment