uswds / uswds-compile

Simple Gulp 5 functions for copying USWDS static assets and transforming USWDS Sass into browser-readable CSS.
Other
20 stars 12 forks source link

Icons: Allow for custom icon directory #30

Closed mejiaj closed 2 years ago

mejiaj commented 2 years ago

Problem

As a developer, I'd like to have an option to track icon changes more easily.

Currently I can only set uswds.paths.dist.img, this directory performs two functions:

  1. Tells Compile where to import USWDS images
  2. Looks for {{ uswds.paths.dist.img }}/usa-icons/**/*.svg to build the sprite

This means on gulp init I'll get hundreds of file changes unless I add these images to gitignored directory.

⚠️ Ignoring directories prevents me from tracking changes to my sprite. Because they'll be lost on npx gulp copyAssets on a circleci build (like uswds-site).

Solution

What I'd like to see is a setting maybe uswds.paths.dist.icons that will also watch that directory for changes and add them to the already compiled sprite.

Additionally

It would be great to have the additional option of deciding where to only use this directory or combine it with usa-icons