Skip to content

Mix supports sparse checkouts for git dependencies

January 15, 2023

Mix can do sparse checkouts of git dependencies with the :sparse option. That’s handy if you only need a single directory from a repository. Phoenix uses it to pull in just the optimised SVGs from the heroicons repo:

{:heroicons,
 github: "tailwindlabs/heroicons",
 tag: "v2.0.13",
 sparse: "optimized",
 app: false,
 compile: false,
 depth: 1}

This clones the repository but only checks out the optimized directory, skipping all the source SVGs and build tooling you don’t need.

—

Back to TIL

Next: Tailwind's arbitrary selectors can style the progress element's browser pseudo-elements

Phil-Bastian Berndt

Phil-Bastian Berndt
Tech Lead at Naymspace