[ALOY-865] Cache global style
GitHub Issue | n/a |
---|---|
Type | Sub-task |
Priority | High |
Status | Resolved |
Resolution | Fixed |
Resolution Date | 2013-10-29T22:25:09.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Alloy 1.3.0, 2013 Sprint 22 |
Components | Styling |
Labels | n/a |
Reporter | Tony Lukasavage |
Assignee | Unknown |
Created | 2013-10-28T20:58:20.000+0000 |
Updated | 2018-03-07T22:26:11.000+0000 |
Description
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.
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):
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: