department-of-veterans-affairs / va-mobile-library

https://department-of-veterans-affairs.github.io/va-mobile-library/
ISC License
0 stars 0 forks source link

DS - Script to import VADS Icons into assets package #244

Closed narin closed 1 month ago

narin commented 3 months ago

Description

We want to utilize the same icons in VADS icon library for our Icon component. For the web, VADS uses a sprite sheet that contains all icons from USWDS with the addition of some of their own icons. They use this script to generate the sprite sheet. Based on the discovery done in #145, we should be able to utilize the same icons from the sprite sheet and update our Icon component with the new icons

VADS sprite sheet is available as part of their component-library package, however we should avoid simply adding the component library as a dependency since it would add 30+ megabytes to our assets package. Instead, we should add it as a dev dependency, and write a script that will extract the icons from sprite.svg from node modules into our assets repo.

Acceptance Criteria

- [ ] Add [@department-of-veterans-affairs/component-library](https://www.npmjs.com/package/@department-of-veterans-affairs/component-library) as a devDependency in our `assets` package - [ ] Add an npm script that extracts the icons from [sprite.svg](https://github.com/department-of-veterans-affairs/component-library/blob/main/packages/web-components/src/assets/sprite.svg) into `packages/assets/svgs` - [ ] Run the script and check the icons into the repo