Permalink
Browse files

import of jquery 1.8.1 from Google CDN

  • Loading branch information...
1 parent a81132c commit 76aee0eb13a7452203a40c7eafc800042ee2820f @paulirish paulirish committed Sep 6, 2012
Showing with 663 additions and 589 deletions.
  1. +1 −1 component.json
  2. +662 −588 jquery.js
View
@@ -1,6 +1,6 @@
{
"name" : "jquery",
- "version" : "1.8.0",
+ "version" : "1.8.1",
"main" : "./jquery.js",
"dependencies": {
}
Oops, something went wrong.

9 comments on commit 76aee0e

Is there a specific repo this shim is in place rather than using the jQuery main repo? Just trying to understand the thought behind here. Also, why is there no minification? I'd put a pull in but I need to understand the logic behind this first.

Owner

SlexAxton replied Sep 11, 2012

jQuery doesn't have a full build of jquery.js in the jquery repo. It's just all the parts and a build tool. The same is true for projects that have required build steps (handlebars, for instance).

It is not minified because that is not the purpose of having components. It should optimize for debugging, not serving. You should do a minification and concat step at build time. Grunt is a good option for this, or yeoman can help you with even more (uses grunt under the covers). Require.js is another option if you're using these as AMD modules.

Owner

SlexAxton replied Sep 12, 2012

Yes, I'd consider you off base. It is not inadvisable to have a build step that includes minification. It is considered a best practice. The jQuery project just uses Uglify.js and if you run it as part of your build step there is no danger.

jQuery on the google cdn is minified because you're intentionally leaving it out of your build to try to gain speed from googles good servers and higher cache hits, but mostly people use it to quickly get going on projects. It's surprisingly (to some) usually faster to just build it into an app file.

Owner

SlexAxton replied Sep 12, 2012

There is nothing wrong with minifying libraries yourself. Promise. Especially if you concatenate as well. It's a really good thing.

Using the non-minified versions of applications in development is a best practice, because it can make debugging a touch less hellish.

Alright, seems the consensus is that it's cool, so I'll leave it be. Just for the record-- I usually use in my production side minified and concat'd libraries, and in dev/local split max assets. Totally get what you have been saying about debugging with full. Just making sure its not bad form to minify jQuery myself (considering I'm using bower to grab this version). Seems it's not, so let the self-minification begin.

Owner

tomdale replied Sep 12, 2012

Going to go ahead and 👍 @SlexAxton here (which is a novel and strange sensation). I've been building large JavaScript apps since 2009 and we always treat our libraries/frameworks as just another source file, so it gets included in our minification and concatenation step like any other file. So far it has not caused any issues (except for one regretful experience in 2010 with Closure Compiler, which I thought I had blocked out of my memory.)

Owner

paulirish replied Sep 12, 2012

⬆️

Please sign in to comment.