kpn / kpn-style

Reusable (style) packages for anyone working on front-end for KPN.
https://style.kpn.com
MIT License
17 stars 3 forks source link

Automate icon generation (UI + service icons) #21

Open coenkoopmans opened 4 years ago

coenkoopmans commented 4 years ago

Description

The icons get delivered by the designers in SVG format. Currently, these SVGs have been bundled to a font icon using IcoMoon. We want to prevent extending the license for this, and instead automate this process. The flow envisioned for this is:

  1. Put SVGs in a folder (such as ui-icons) with standardized names (such as ui-user.svg, ui-business.svg).
  2. Run an npm script (such as npm run generate-icons).
  3. The SVGs get optimized (for example by SVGO).
  4. The optimized SVGs are made into separate icon fonts (ui, service font) where the class names of the icons are equal to the name in the folder (so ui-user.svg becomes ui-user).
  5. The relevant documentation MD pages are automatically updated to reflect the correct, newly generated icon set (total replacement, so make sure that old icons do not stay in the MD file)

Also, this process should automatically be executed by Travis CI, at least on develop and master.

Acceptance criteria

Tasks

References