Open kwallis opened 12 years ago
What do you want this parameter called -u or --uglify or do you want to use a special tag called - r or -- release ?
@kwallis - we will be taking this on next sprint, I need description for this. @jeffheifetz @rwmtse @EricLeiLi @jkeshavarzi @rcruz - any suggestions are welcome. I suggest we do one flag for minify and uglify and call it release and then we uglify and minify the users content before we put it through to the bar packager.
Question for everyone- Should we also uglify and minify the Framework JavaScript as its also included in the bar?
If it is created is it possible to have the release flag also strip out developer debugging (aka console.log()) calls as well? :) Since there is no way to tell if an app is in debug mode it would save time stripping those out for release.
@glasspear comment is valid...no way in your app to find out it it is in debug mode or release mode. it is all tied together.
i think that if we go down the path of a --release flag, that we might consider adding api calls to access that within the app, and devs can write whatever logic they want. maybe even all packager command line args used? if (blackberry.args.debug) console.log(...);
i know we talked about further overload on -d. @kwallis maybe we do this right and take the time to change Ripple as well?
Updated acceptance criteria
Are we looking to minify css files as well?
Any reason not to?
----- Original Message ----- From: Adrian Lee [mailto:reply@reply.github.com] Sent: Friday, June 29, 2012 04:58 PM To: Ken Wallis Subject: Re: [BB10-Webworks-Packager] As a WebWorks developer, I can have the packager minify my application content (#116)
Are we looking to minify css files as well?
Reply to this email directly or view it on GitHub: https://github.com/blackberry/BB10-Webworks-Packager/issues/116#issuecomment-6677975
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.
Just making sure. I think I've decided on our minification weapon of choice. Time to do some quick tests with it!
Cool
----- Original Message ----- From: Adrian Lee [mailto:reply@reply.github.com] Sent: Friday, June 29, 2012 05:03 PM To: Ken Wallis Subject: Re: [BB10-Webworks-Packager] As a WebWorks developer, I can have the packager minify my application content (#116)
Just making sure. I think I've decided on our minification weapon of choice. Time to do some quick tests with it!
Reply to this email directly or view it on GitHub: https://github.com/blackberry/BB10-Webworks-Packager/issues/116#issuecomment-6678125
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.
Can we rename --no-minify
to --noMinify
or something without -
The commander node module parses --no-minify
incorrectly. A fix for this would be messy!
I blame Nukul who assured me this would work... ;)
Let's go with "--noMinify"
----- Original Message ----- From: Adrian Lee [mailto:reply@reply.github.com] Sent: Tuesday, July 03, 2012 06:16 PM To: Ken Wallis Subject: Re: [BB10-Webworks-Packager] As a WebWorks developer, I can have the packager minify my application content (#116)
Can we rename --no-minify
to --noMinify
or something without -
The commander node module parses --no-minify
incorrectly. A fix for this would be messy!
Reply to this email directly or view it on GitHub: https://github.com/blackberry/BB10-Webworks-Packager/issues/116#issuecomment-6748110
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.
A fix for this wouldn't be thatttt messy. We would basically do the same thing we do to support -buildId. Depends how badly we want it to be --no-minify.
if (args[i] === "--no-minify") {
args[i] = "--noMinify";
}
This way we can have the option --no-minify and internally we would rename it to something that works. I will let you guys decide.
I would argue against that if I had not known it was already done for buildId. That way will work too!
_In lib/cmdline.js_
.option('--no-minify', 'Turn off minification of both framework and application javascript & css code.')
When calling command.parse(args);
and commander will parse the arg for that line to be -minify
So we "override" with
if (args[i] === "--no-minify") {
args[i] = "-minify";
}
But I would prefer to stick with the camelCase convention instead of hyphens since we already have for the other args.
@adrianlee The substitution would happen _before_ we do anything with commander [ command.parse(args) ]. As long as we substitute with a value that works [i.e --noMinify] we should be fine. Whichever option we decide, both should work :).
Implementaions pretty much done. Do we want to gzip our minified files?
Ken Wallis
Product Manager – BlackBerry WebWorks
Research In Motion
(905) 629-4746 x14369
From: Adrian Lee [reply@reply.github.com] Sent: Tuesday, July 03, 2012 7:09 PM To: Ken Wallis Subject: Re: [BB10-Webworks-Packager] As a WebWorks developer, I can have the packager minify my application content (#116)
Implementaions pretty much done. Do we want to gzip our minified files?
Reply to this email directly or view it on GitHub: https://github.com/blackberry/BB10-Webworks-Packager/issues/116#issuecomment-6749061
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.
In theory, there would be significant improvement gains from doing this. Both static file size and even response size(xhr through our bridge if it isn't already gzip compressing already which I believe it isn't).
I haven't tried it yet but will make sure to test it out. I'm pretty sure our loading times will be much faster. I'm ballparking 50+% faster loading times for apps with multiple extensions.
Actually I take that back. Our framework file sizes are so small that it probably wont benefit from gzip and can even potentially increase the file sizes.
We really should be using --no-minify it is correct way of using negation on the command line. I dislike camel case on the command line.
commander should handle this with elegance. look at the program.cheese line in the link below
https://github.com/visionmedia/commander.js/blob/master/lib/commander.js#L263
--no-minify should come in as program.minify = true
Testing completed on Mac and Windows for build# : "http://ci0000003863287:8080/hudson/job/BB10-Webworks-Packager-next-minify/851/" and no issues found.
Including feedback from our Oct developer experience review:
Will do it for gold release , not this release
From: Adam Stanley To: blackberry/BB10-Webworks-Packager Reply To: blackberry/BB10-Webworks-Packager Re: [BB10-Webworks-Packager] As a WebWorks developer, I can have the packager minify my application content (#116) 2012-11-08 8:54:35 AM
Including feedback from our Oct developer experience review:
\u2014 Reply to this email directly or view it on GitHubhttps://github.com/blackberry/BB10-Webworks-Packager/issues/116#issuecomment-10188485.
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.
Acceptance Criteria