Menu icon Foundation
Exclude JS from ZURB Template of Foundation 6 for sites

Hello all,

I have googled and crawled the docs to find out how to remove unused JS from the CLI generated ZURB Template.

https://foundation.zurb.com/forum/posts/49930-exclude-javascript-modules

^ this post is regarding this and it has no answers yet.

 

In the docs it's written how to optionally add the plugins for the basic template, but for the ZURB template I cannot find how to remove them, since they're all included by default.

 

Also as a side-question, "Total filesize of every component and class now weighs in at 60KB CSS & 84KB JS"

is written on the Foundation 6 microsite.

Are these values after gzip? When i run "npm bulld run" JS alone is at 210kb.

 

I'd appreciate some guidance on this issue.

 

Thanks in advance.

jsminifycompressionfile sizecustomize

Hello all,

I have googled and crawled the docs to find out how to remove unused JS from the CLI generated ZURB Template.

https://foundation.zurb.com/forum/posts/49930-exclude-javascript-modules

^ this post is regarding this and it has no answers yet.

 

In the docs it's written how to optionally add the plugins for the basic template, but for the ZURB template I cannot find how to remove them, since they're all included by default.

 

Also as a side-question, "Total filesize of every component and class now weighs in at 60KB CSS & 84KB JS"

is written on the Foundation 6 microsite.

Are these values after gzip? When i run "npm bulld run" JS alone is at 210kb.

 

I'd appreciate some guidance on this issue.

 

Thanks in advance.

yetius coolious about 2 years ago

For future reference to newcomers unfamiliar with Gulp and ZURB Template.

 

To select which files should be excluded/included, you have to edit

config.yml

Starting with line 38 at the time of this writing. under the "javascript:" section.

Just uncomment what you don't need as per instructed in the file comments.

 

I think this should be specified in the docs.

 

P.S.: Enabling UnCSS reduces CSS filesize significantly, this can be turned on by uncommenting a line in the gulp.babel.js file