[ALOY-627] Only regenerate and copy CFG.js to Resources when app/config.json is added/removed/changed
| GitHub Issue | n/a |
|---|---|
| Type | Improvement |
| Priority | Medium |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2014-05-05T18:58:00.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Alloy 1.4.0, Alloy 1.2.0 |
| Components | Titanium SDK, XML |
| Labels | qe-testadded |
| Reporter | Tony Lukasavage |
| Assignee | Tim Poulsen |
| Created | 2013-04-18T15:52:38.000+0000 |
| Updated | 2014-05-09T11:24:31.000+0000 |
Description
The title kind of says it all. This will reduce compile time and make update packages smaller for liveview.
Verified working as expected. Titanium SDK 3.1.2.v20130806034554 Alloy 1.2.0-alpha6 Appcelerator Studio 3.1.2.201308021524 CLI 3.1.1 Node 0.10.13 Closing
PR: https://github.com/appcelerator/alloy/pull/380 With any alloy project: 1.
alloy compile --config platform=ios(other platforms fine too) 2. Watch the console output, you should see\[INFO\] \[config.json\] regenerating CFG.js from config.json...3. Repeat step 1 4. In the console output, you should see\[INFO\] \[config.json\] config.json unchanged, using cached config.json...5. Modify config.json (e.g. set sourcemap to true or false, opposite of whatever it was) 6. Repeat step 1 and you should see the message from step 2 again. In this PR, I compare a hash of the previous build's CFG.js to that of this build. I don't see a convenient and reliable way to bypass reading config.json and hashing it to determine if the file has changed. The performance difference with this implementation is negligible: trading an MD5 hash operation for a file write operation.PR merged
Verified the FIXED with: Appc-Studio:3.3.0.201405080918 sdk:3.3.0.v20140508135704 acs:1.0.14 alloy:1.4.0-dev npm:1.3.2 titanium:3.3.0-dev titanium-code-processor:1.1.1 xcode:5.1.1 Working as expected. Hence closing the issue.