[ALOY-866] Only recompile app.js when necessary
GitHub Issue | n/a |
---|---|
Type | Sub-task |
Priority | High |
Status | Resolved |
Resolution | Fixed |
Resolution Date | 2013-10-30T19:33:32.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Alloy 1.3.0, 2013 Sprint 22 |
Components | Runtime, Tooling |
Labels | n/a |
Reporter | Tony Lukasavage |
Assignee | Unknown |
Created | 2013-10-30T15:53:14.000+0000 |
Updated | 2018-03-07T22:26:02.000+0000 |
Description
app.js is recompiled on every build now. We should only rebuild when changes occur to the app.js, or alloy is compiled for a platform for which is has not already compiled (meaning it has not already generated a platform-specific app.js).
NOTE: We also need to consider source maps when doing this.
PR: https://github.com/appcelerator/alloy/pull/265 Functional testing:
Create a default alloy app
compile the app for ios with
alloy compile --platform ios
Make sure you see the following line in the alloy log:
After the compile completes, run it again. This time you should see the following instead in the log:
Now, compile for a different platform,
alloy compile --platform android
You should see a log similar to step 3, citing the android folders this time
Compile again for android, and you should see a log like step 4
GO back and compile again for ios. It should still use the cached app.js, since it is contained in the platform-specific folder and was not overwritten by our android testing.
Make a change to the alloy.js and then compile for both android and ios. Both should generate a log as in step #3 the first time, then the log in step #4 on all subsequent builds.