Forivin
Forivin

Reputation: 15488

What exactly is "sencha app watch" doing?

I'd like to replicate what sencha app watch is doing in a custom executable to get more control over the whole process... Watching the file system seems pretty straight forward, but what is it with the rebuild that app watch is allegedly doing? In the documentation it just says (I quote):

This command watches the current application’s source code for changes and and rebuild the necessary outputs to support “dev mode”.

So what exactly does "rebuild" mean? When I manually run sencha app build it takes like forever to finish, while sencha app watch is doing it quite a bit faster... So I doubt that this is what it actually does.
A rebuild command per se doesn't exist either...

Upvotes: 2

Views: 1674

Answers (1)

Robert Watkins
Robert Watkins

Reputation: 2206

It's doing the equivalent of sencha app build development. The reason it goes faster is that it keeps the JVM running and it doesn't re-run the initialisation tasks continually.

If you want to take more control of this yourself, the relevant Ant tasks are in the Sencha CMD distribution - most (but not all) Sencha CMD commands are delegated down to the Ant tasks.

It's a little smarter than doing a simple build - because it knows which files have been changed, it knows what steps it needs to do. As such, it won't run redundant steps (another speed win).

One key difference is with CSS - using sencha app watch will create the CSS once, and then subsequent edits are processed using Fashion instead.

Upvotes: 2

Related Questions