gulp
- watch for changes + browser-sync (http server with livereload) + weinre debuggergulp cordova:emulate:ios
- run application in iOS emulatorgulp cordova:run:android
- run application on Android's devisegulp help
or see gulp/tasks.coffee
for more information about all tasksgulpfile.coffee
)gulp
server without that)git clone jtomaszewski/ionicstarter-mobile
cd ionicstarter-mobile
git submodule update --init --recursive
# install dependencies
npm install
npm install -g gulp
bower install
brew install imagemagick # or `apt-get install imagemagick`, if you're on linux
gulp # build www/ directory and run http server on 4440 port
If you get "too many files" error, try: ulimit -n 10000
. You may want to add this line to your .bashrc / .zshrc / config.fish.
gulp build
do?More or less:
app/
will be compiled and copied to www/
.ejs
files from assets/
will be compiled to www/
.assets/
will be copied to www/
.For detailed description, see gulpfile.coffee
.
P.S. www/
is like dist/
directory for Cordova. That's why it's not included in this repository, as it's fully generated with gulp
.
Requirements: installed PhantomJS and configured selenium standalone webdriver.
gulp test:unit # using PhantomJS
gulp test:unit --browsers Chrome # or using Google Chrome
gulp # your www/ directory should be built and served at :4400 port
node_modules/.bin/webdriver-manager start & # run selenium server in the background
gulp test:e2e # finally, run e2e tests
I recommend tmux for handling multiple terminal tabs/windows ;)
Copy .envrc.android-sample
or .envrc.ios-sample
to .envrc
and configure it.
Ofcourse, if you're a Mac user and you can compile both Android and iOS on the same machine, you can include all the variables from both of these files in only one .envrc
.
Also, make sure you have all the keys and certificates needed stored in keys/android/
and keys/ios/
:
keys/android/ionicstarter.keystore
keys/ios/ionicstarter_staging.mobileprovision
keys/ios/ionicstarter_production.mobileprovision
Ensure, you have configured ios/android platform with Cordova, f.e. by running gulp cordova:platform-add:[ios|android]
.
Run gulp cordova:emulate:[ios|android]
or gulp cordova:run:[ios|android]
.
First, generate the certificate keys:
keytool -genkey -v -keystore keys/android/$ANDROID_KEYSTORE_NAME.keystore -alias $ANDROID_ALIAS_NAME -keyalg RSA -keysize 2048 -validity 10000
Create a certificate and a provisioning profile, as it's described here.
Download the provisioning profile and copy it into keys/ios/
, so it will match the IOS_PROVISIONING_PROFILE
file set up in the gulpfile.coffee
.
Then, generate the application and deploy it to the webserver with:
gulp release:[ios|android] --env=[staging|production]