Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added instructions to execute on iPhone or iPad.

  • Loading branch information...
commit c388a757921b54ef1c8537984615eff2f57f15e7 1 parent c935a44
@guilhermechapiewski authored
Showing with 35 additions and 4 deletions.
  1. +20 −1 Makefile
  2. +15 −3 README.textile
View
21 Makefile
@@ -3,14 +3,33 @@
PROJECT_NAME=SampleApp
PROJECT_ROOT=$(shell pwd)
-DEVICE_TYPE=iphone
+
+run-iphone:
+ @DEVICE_TYPE=iphone make run
+
+test-iphone:
+ @DEVICE_TYPE=iphone make test
+
+run-ipad:
+ @DEVICE_TYPE=ipad make run
+
+test-ipad:
+ @DEVICE_TYPE=ipad make test
run:
+ @if [ "${DEVICE_TYPE}" == "" ]; then\
+ echo "Please run \"make run-[iphone|ipad]\" instead.";\
+ exit 1;\
+ fi
@mkdir -p ${PROJECT_ROOT}/${PROJECT_NAME}/Resources/test/
@echo "" > ${PROJECT_ROOT}/${PROJECT_NAME}/Resources/test/enabled.js
@make launch-titanium
test:
+ @if [ "${DEVICE_TYPE}" == "" ]; then\
+ echo "Please run \"make test-[iphone|ipad]\" instead.";\
+ exit 1;\
+ fi
@mkdir -p ${PROJECT_ROOT}/${PROJECT_NAME}/Resources/test/
@echo "sampleapp.tests_enabled = true;" > ${PROJECT_ROOT}/${PROJECT_NAME}/Resources/test/enabled.js
@make launch-titanium
View
18 README.textile
@@ -20,11 +20,23 @@ h2. How to start the project
Download the source code, go to the project root and type:
-<pre>$ make test</pre>
+<pre>$ make run-iphone</pre>
-To run the application without executing the tests, go to project root and type:
+To run the application on the iPad, type:
-<pre>$ make run</pre>
+<pre>$ make clean && make run-ipad</pre>
+
+_* You just have to use "make clean" before the run command if you change the device type. If you're using the same device between executions, it's not necessary to execute "make clean" because it will force Titanium to re-compile the entire project again, which is considerably slow._
+
+To run the application executing the tests, go to project root and type:
+
+<pre>$ make test-iphone</pre>
+
+Or:
+
+<pre>$ make test-ipad</pre>
+
+_* Remember to execute "make clean" whenever you change the device type._
You don't have to import the project on Titanium Developer. You can do that if you want, but I prefer to start from the command line. If you want to do this in your project too, just copy "Makefile":https://github.com/guilhermechapiewski/titanium-jasmine/blob/master/Makefile and the "bin":https://github.com/guilhermechapiewski/titanium-jasmine/tree/master/bin directory to your project.
Please sign in to comment.
Something went wrong with that request. Please try again.