[TIMOB-15488] Mobile Web: CLI mobile web production builds include *.js.uncompressed.js files in addition to minified versions
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-04-04T17:27:04.000+0000 |
Affected Version/s | n/a |
Fix Version/s | 2014 Sprint 07, 2014 Sprint 07 Tooling, Release 3.3.0 |
Components | MobileWeb |
Labels | build, cli, mobileweb, production, qe-closed-3.3.0, qe-testadded, titanium-cli |
Reporter | Julian Fraser |
Assignee | Chris Barber |
Created | 2013-10-08T11:36:42.000+0000 |
Updated | 2014-07-31T18:05:52.000+0000 |
Description
When building for mobile web using the CLI with the following command, the resulting build contains minified JS files in addition to their uncompressed counterpart (*.js.uncompressed.js):
titanium build -p mobileweb -D production
At present, in order to ready a build for distribution, all uncompressed files must be deleted manually or via script.
The following command automates the delete for all files in the current directory matching all files ending with the uncompressed extension. I'm assuming the CLI production build process should be doing this for you though.
It's worth noting that the uncompressed files are not used in the final app...they are there for reference only and have no impact on performance.
Understood, which is why simply deleting the uncompressed file does not break the app. However in this particular use case, I am building a packaged app for Firefox OS, and therefore the inclusion of the uncompressed files adds unwanted bloat to the final package.
The original plan was to add an option to the tiapp.xml that allowed you to disable the saving of the uncompressed files. We never got around to adding this feature. :( I do agree that we need to fix it, but I want to fix it properly and not using some hack. In the meantime, you can use a post-compile build hook that removes the uncompressed files.
Master pull request: https://github.com/appcelerator/titanium_mobile/pull/5582 3_2_X_hybrid pull request: https://github.com/appcelerator/titanium_mobile/pull/5583
Tested and verified no *.js.uncompressed.js files in the build folder. Mac osx 10.9.2 Mavericks Appcelerator Studio, build: 3.3.0.201405011408 Titanium SDK, build: 3.3.0.v20140505115416 Node.JS Version: v0.10.13 NPM Version: 1.3.2 acs@1.0.14 alloy@1.4.0-dev npm@1.3.2 titanium@3.3.0-dev titanium-code-processor@1.1.1