Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7180] MobileWeb: Minify, strip comments, and include only necessary CSS in production builds

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionWon't Fix
Resolution Date2017-06-26T18:39:39.000+0000
Affected Version/sRelease 2.0.0
Fix Version/sn/a
ComponentsMobileWeb
Labelstbs-future
ReporterChris Barber
AssigneeChris Barber
Created2012-01-13T14:44:11.000+0000
Updated2018-04-04T23:20:42.000+0000

Description

During a production build, need to strip comments, minify, and only include the CSS that's needed based on the dependencies.

Comments

  1. Dário Marcelino 2012-05-16

    Hi, will this be included in 2.1? It would be great if Titanium could minify the production build! Many thanks
  2. Chris Barber 2012-05-16

    We already do the things described in this ticket, but they're sorta hacked into place. We currently use Google Closure compiler for production builds (i.e. publish->package mobile web). This will minify and strip comments in JavaScript code. We don't have much for CSS, but what we do have is currently combined, then minified using some Python library. We are working on a compile-time code processor that will eventually replace Google Closure compiler, provide better minification, target-specific builds, and expose many more configuration variables.
  3. Dário Marcelino 2012-05-16

    Thanks Chris for taking the time to answer. I must be doing something wrong... When I do publish->package mobile web my code is not minified. Actually is quite strange because I get *.js and *.uncompressed.js files but they are exactly the same. I've been using nightly SDKs v2.1.* btw. Cheers, Dário
  4. Chris Barber 2012-05-16

    This ticket is not the appropriate support channel for why minification is not working. You should use the Developer Center Q&A: http://developer.appcelerator.com/questions. To quickly address your results, if you see the uncompressed files, then you are doing a production build properly. If the compressed and uncompressed files are the same, then it was unable to compress the file probably due to a syntax issue. There could be something else going on too, not sure.
  5. Lee Morris 2017-06-26

    Marking ticket as "Won't Fix" as MobileWeb has been deprecated.
  6. Eric Merriman 2018-04-04

    Closing as will not fix.

JSON Source