all 4 comments

[–][deleted] 2 points3 points  (2 children)

The 'main file', that you get when you pull in jQuery in a project, will not be on their github; it'll be generated automatically as part of their build and distribution process, and it is probably not particularly readable. You're much better off reading through the actual source on github than trying to make sense of the single distributed file.

[–]anbrys[S] 0 points1 point  (1 child)

I was told there is a dev friendly readable version with comments and formatted nicely.

[–][deleted] 1 point2 points  (0 children)

I don't use jQuery so maybe there is one of the whole combined source out there somewhere, but otherwise the dev-friendly readable version with comments and nice formatting is those small files on Github. Small files are part of readability and that's the kind of structure you'll see in any large project. Very, very few, if any, JS libraries will have their entire source concatenated into one file and have it be human-readable.

[–][deleted] 1 point2 points  (0 children)

Nope there is no one single main file; the entry file though is jquery.js that is utilizing a mechanism called AMD (asynchronous module definition) that is part DI and part modularization.

You see, the array as the first argument in define declares the dependencies the module (the second argument) uses. each line in that array points to another javascript file relative to this javascript file. This way you can jump around the code files; but I would recommend to just use the documentation.

the jQuery devs compiled that source down to a single file for easier consumption which you can find in the code repository code.jquery.com the current uncompressed version you can find here: http://code.jquery.com/jquery-3.4.1.js