Titanium JIRA Archive
Alloy (ALOY)

[ALOY-690] Add config.json option to disable source map creation

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2013-06-06T16:18:46.000+0000
Affected Version/sn/a
Fix Version/sAlloy 1.2.0, 2013 Sprint 12
ComponentsTooling
Labelscommunity, qe-testadded
ReporterTony Lukasavage
AssigneeTony Lukasavage
Created2013-06-05T12:38:10.000+0000
Updated2013-07-29T21:40:27.000+0000

Description

Currently source maps are generated for all controllers files to facilitate the step through debugger and code processor (and potentially future projects). This does however add additional time to the alloy compile process. We should add an option to the config.json that allows developers to skip the source map step if they are not using the aforementioned features. This will speed up overall compile time.

Comments

  1. Tony Lukasavage 2013-06-06

    PR: https://github.com/appcelerator/alloy/pull/147 test app: https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-690 To pass a functional test, ensure that when you compile this app that no source maps are generated in the compile output. You should also be able to set sourcemap to true, or remove the entry entirely, and the source maps should again be generated. This will be easiest to identify if you do a manual compile like this and ensure that the log level is set to trace:
    alloy compile --config platform=ios --logLevel 4

    sample output with source maps

       [INFO] ----- MVC GENERATION -----
       [INFO] [index.xml] view processing...
       [INFO]   style:      "index.tss"
       [INFO]   view:       "index.xml"
       [INFO]   controller: "index.js"
       [TRACE] - Processing "builtins" module...
       [TRACE] - Processing "optimizer" module...
       [TRACE] - Processing "compress" module...
       [INFO]   created:    "Resources/alloy/controllers/index.js"
       [DEBUG]   map:        "build/map/Resources/alloy/controllers/index.js.map"
       [INFO]   created:     "Resources/alloy/styles/index.js"
       [INFO] 
       [INFO] [app.js] Titanium entry point processing...
       [TRACE] - Processing "builtins" module...
       [TRACE] - Processing "optimizer" module...
       [TRACE] - Processing "compress" module...
       [INFO]   created:    "Resources/app.js"
       [DEBUG]   map:        "build/map/Resources/app.js.map"
       

    sample output without source maps

       [INFO] ----- MVC GENERATION -----
       [INFO] [index.xml] view processing...
       [INFO]   style:      "index.tss"
       [INFO]   view:       "index.xml"
       [INFO]   controller: "index.js"
       [TRACE] - Processing "builtins" module...
       [TRACE] - Processing "optimizer" module...
       [TRACE] - Processing "compress" module...
       [INFO]   created:    "Resources/alloy/controllers/index.js"
       [INFO]   created:     "Resources/alloy/styles/index.js"
       [INFO] 
       [INFO] [app.js] Titanium entry point processing...
       [TRACE] - Processing "builtins" module...
       [TRACE] - Processing "optimizer" module...
       [TRACE] - Processing "compress" module...
       [INFO]   created:    "Resources/app.js"
       
  2. Federico Casali 2013-07-29

    Verified as working. Titanium SDK 3.1.2.v20130726192706 Alloy 1.2.0-alpha Appcelerator Studio 3.1.3.201307252418 CLI 3.1.2 Node 0.8.22 Closing.

JSON Source