Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Execute "tishadow run" in your Titanium app directory whenever a JavaScript file changes.

Automatic TiShadow Installs

Execute "tishadow run" in your Titanium app directory whenever a JavaScript file changes. Edit your JS files in a text editor, save, then switch to the test device or simulator. Profit.

Install supervisor

[sudo] npm install -g supervisor

Execute tishadow run anytime a JavaScript file changes

supervisor -n exit -x tishadow run
@FokkeZB

This comment has been minimized.

Show comment Hide comment
@FokkeZB

FokkeZB May 13, 2013

Alloy + TiShadow

This is how you monitor the app folder and compile Alloy with every change:

supervisor -n exit -w app -e "js|tss|xml" -x alloy -- compile --config platform=ios

Then open a second shell where you watch just the Resources folder and run TiShadow:

supervisor -n exit -w Resources -x tishadow run

Now just do your coding and press ⇧⌘S (Save all) when you want an update :)

FokkeZB commented May 13, 2013

Alloy + TiShadow

This is how you monitor the app folder and compile Alloy with every change:

supervisor -n exit -w app -e "js|tss|xml" -x alloy -- compile --config platform=ios

Then open a second shell where you watch just the Resources folder and run TiShadow:

supervisor -n exit -w Resources -x tishadow run

Now just do your coding and press ⇧⌘S (Save all) when you want an update :)

@WooD1k

This comment has been minimized.

Show comment Hide comment
@WooD1k

WooD1k Sep 3, 2013

How can we run 'tishadow run --update' with supervisor?

Thanks in advance!

WooD1k commented Sep 3, 2013

How can we run 'tishadow run --update' with supervisor?

Thanks in advance!

@farwayer

This comment has been minimized.

Show comment Hide comment
@farwayer

farwayer Oct 17, 2013

How can we run 'tishadow run --update' with supervisor?

supervisor -n exit -w Resources -x tishadow -- run --update

How can we run 'tishadow run --update' with supervisor?

supervisor -n exit -w Resources -x tishadow -- run --update

@WooD1k

This comment has been minimized.

Show comment Hide comment
@WooD1k

WooD1k Oct 17, 2013

Thanks a bunch!

WooD1k commented Oct 17, 2013

Thanks a bunch!

@Wingee

This comment has been minimized.

Show comment Hide comment
@Wingee

Wingee Nov 29, 2013

Is there anyway to get this to work with ios and android at the same time?!
Thanks!

Wingee commented Nov 29, 2013

Is there anyway to get this to work with ios and android at the same time?!
Thanks!

@RBAtkins0n

This comment has been minimized.

Show comment Hide comment
@RBAtkins0n

RBAtkins0n Aug 25, 2015

I made the following alias' in my .bashrc

alias tiwch='supervisor -n exit -w app -e "js|tss|xml" -x tishadow -- run --update'
alias tiwrk='cd ~/Documents/Appcelerator_Studio_Workspace/'
alias tisvr='tishadow server'

Now whenever I need to start, I open two terminal windows, in one i type "tisvr" to start the server.
I then open up the second window and type "tiwrk" to navigate to my Appcelerator workspace, cd into the Project directory and then type "tiwch" to start the watch process.

I made the following alias' in my .bashrc

alias tiwch='supervisor -n exit -w app -e "js|tss|xml" -x tishadow -- run --update'
alias tiwrk='cd ~/Documents/Appcelerator_Studio_Workspace/'
alias tisvr='tishadow server'

Now whenever I need to start, I open two terminal windows, in one i type "tisvr" to start the server.
I then open up the second window and type "tiwrk" to navigate to my Appcelerator workspace, cd into the Project directory and then type "tiwch" to start the watch process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment