[TIMOB-7180] MobileWeb: Minify, strip comments, and include only necessary CSS in production builds
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2017-06-26T18:39:39.000+0000 |
Affected Version/s | Release 2.0.0 |
Fix Version/s | n/a |
Components | MobileWeb |
Labels | tbs-future |
Reporter | Chris Barber |
Assignee | Chris Barber |
Created | 2012-01-13T14:44:11.000+0000 |
Updated | 2018-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.
Hi, will this be included in 2.1? It would be great if Titanium could minify the production build! Many thanks
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.
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
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.
Marking ticket as "Won't Fix" as MobileWeb has been deprecated.
Closing as will not fix.