Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12349] CLI: Allow Android builds to disable minification

GitHub Issuen/a
TypeStory
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2013-01-23T19:02:30.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sRelease 3.0.2, Release 3.1.0, 2013 Sprint 02 JS, 2013 Sprint 02
ComponentsCLI
Labelsn/a
ReporterIngo Muschenetz
AssigneeChris Barber
Created2013-01-19T20:17:47.000+0000
Updated2017-03-24T21:04:00.000+0000

Description

Using the new CLI, Android builds need to respect the "skip-js-minify" flag. It has been suggested we do this via an environment variable the Node.js code sets before calling the relevant Python scripts. In order to disable minification in Android, we need to adjust the following: Android: support/android/compiler.py, line 211
def compile_into_bytecode(self, paths):
for fullpath in paths:

skip any JS found inside HTML <script>

if fullpath in self.html_scripts: continue - self.compile_javascript(fullpath) + if false: self.compile_javascript(fullpath) self.compiled_files.append(fullpath)

Pack JavaScript sources into an asset crypt.

jspacker.pack(self.project_dir, self.compiled_files, self.appid, self.gen_dir)

Comments

  1. Ingo Muschenetz 2013-01-19

    Note, there is a trivial related item to relocate the "skip-js-minify" flag which is included in this ticket.
  2. Chris Barber 2013-01-23

    Master pull request: https://github.com/appcelerator/titanium_mobile/pull/3765 3.0.x pull request: https://github.com/appcelerator/titanium_mobile/pull/3766
  3. Lee Morris 2017-03-24

    Closing ticket as fixed with reference to previous comments.

JSON Source