Titanium JIRA Archive
Alloy (ALOY)

[ALOY-865] Cache global style

GitHub Issuen/a
Resolution Date2013-10-29T22:25:09.000+0000
Affected Version/sn/a
Fix Version/sAlloy 1.3.0, 2013 Sprint 22
ReporterTony Lukasavage


Speed up the compile phase by caching the global style. Reuse it when possible. Make sure to check all possible sources for the loaded global style for changes before using the cached version.


  1. Tony Lukasavage 2013-10-29

    PR: https://github.com/appcelerator/alloy/pull/264 test app: https://github.com/appcelerator/alloy/tree/master/test/apps/advanced/themes Functional testing should include running the test app for multiple platforms. Each time you run alloy compile --platform PLATFORM to test, assert the following:

    If this is your first run, a new global style should be created and then saved to the cache at "build/alloy/global_style_cache.json". You should also see this in the alloy log output (depending on the target platform):

       [INFO] ----- MVC GENERATION -----
       [INFO] [app.tss] global style processing...
       [INFO] [app.tss(theme:blue)] global style processing...
       [INFO] [global style] writing to cache...

    If you change the target platform, you should also see output similar to #1 as changing the platform in the "themes" app will also include platform-specific global style modifications.

    If you modify the app.tss in the app, or in the theme for which you are compiling, you should also see output similar to the output in #1

    In all other scenarios, the cached global style should be used. It will indicate this in the alloy log like this:

       [INFO] ----- MVC GENERATION -----
       [INFO] [global style] loading from cache...

JSON Source