Foundation-for-Jekyll-sites / jekyll-foundation

Start your Jekyll (v3) project with Zurb Foundation for Sites (v6, sass).
MIT License
179 stars 64 forks source link

Understanding JS concat size #12

Closed ndrewr closed 8 years ago

ndrewr commented 8 years ago

While in development, I noticed that the (non-production, unminified) all.js file weighs in at about 690KB. This includes stock jQuery and one small plugin library (contributes 4K) with everything else including Foundation core commented out. Un-minified jQuery seems to weigh in about 260K or so at about 9200 lines of code.

Checking the combined all.js source in my browser, it is also more or less 9200 lines of code yet the file size is well over double...does all that extra bulk come from some kind of temporary source-mapping for development mode?

I know that the production step compresses it greatly, I am mostly just curious about whats going on under the hood?

Thx very much for the starter, first time I've employed a Gulp build process :D

core77 commented 8 years ago

I hope you enjoy working with the package as much as I do :-)

You're right! Take a look at the last line in all.js while in development (//# sourceMappingURL=data...). That single line for the source-mapping stuff is a heavy load of 454 KB.

The production build drops that line.

ndrewr commented 8 years ago

Ahah, really good to know! Definitely enjoying working with this package a lot, though I debated for awhile whether to keep the SCSS organization structure (this SMACSS style). New to SASS so I feared it would be overload :p Thanks again!