CSS & JS dependencies

Hi everyone,

For a personal project, I’ve created a short plugin to manage dependencies for CSS and JS files and merge them into a file that updates itself when changes occur.

To those wondering about the purpose: I’m making a template made of variable sections (like slider, lightboxes…), some could use specific JS or CSS, some not. This plugin helps to prevent the user from loading unnecessary CSS/JS if he choses not to include some sections. If your site has no variable parts, you would surely prefer using preprocessors or so.

https://github.com/noclat/kirby-dependencies

Note: it does not minify the code served in dependencies.

2 Likes