[TIMOB-12349] CLI: Allow Android builds to disable minification
GitHub Issue | n/a |
---|---|
Type | Story |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-01-23T19:02:30.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | Release 3.0.2, Release 3.1.0, 2013 Sprint 02 JS, 2013 Sprint 02 |
Components | CLI |
Labels | n/a |
Reporter | Ingo Muschenetz |
Assignee | Chris Barber |
Created | 2013-01-19T20:17:47.000+0000 |
Updated | 2017-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)
Note, there is a trivial related item to relocate the "skip-js-minify" flag which is included in this ticket.
Master pull request: https://github.com/appcelerator/titanium_mobile/pull/3765 3.0.x pull request: https://github.com/appcelerator/titanium_mobile/pull/3766
Closing ticket as fixed with reference to previous comments.