[ALOY-627] Only regenerate and copy CFG.js to Resources when app/config.json is added/removed/changed

GitHub Issuen/a
Resolution Date2014-05-05T18:58:00.000+0000
Affected Version/sn/a
Fix Version/sAlloy 1.4.0, Alloy 1.2.0
ComponentsTitanium SDK, XML
ReporterTony Lukasavage
AssigneeTim Poulsen


The title kind of says it all. This will reduce compile time and make update packages smaller for liveview.


  1. Federico Casali 2013-08-06 Verified working as expected. Titanium SDK 3.1.2.v20130806034554 Alloy 1.2.0-alpha6 Appcelerator Studio CLI 3.1.1 Node 0.10.13 Closing
  2. Tim Poulsen 2014-04-29 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.
  3. Tim Poulsen 2014-05-05 PR merged
  4. Priya Agarwal 2014-05-09 Verified the FIXED with: Appc-Studio: 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.

JSON Source