Page MenuHomePhabricator

Consolidate svgmin config and svg / grunt-svgmin checker
Open, MediumPublic


MobileFrontend, MinervaNeue, and Popups each contain approximately the same lengthy svgmin config and script or Gruntfile. This task encompasses the work to consolidate and move the config and the checker script to a new repo under wikimedia and publish a new NPM package under @wikimedia and replace the duplicate code in MobileFrontend, MinervaNeue, and Popups (don't forget to uninstall the grunt-svgmin package). The new checker should be invoked as a pre-commit hook. This task will also involve re-reading the svgmin configuration documentation to have reasonable due diligence that our configuration and usage are up to date.

See also:

Event Timeline

Restricted Application changed the subtype of this task from "Deadline" to "Task". · View Herald TranscriptSep 13 2018, 4:01 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

How does this relate to the work @Volker_E did (and T178867)?

I'm keen to hear if there is a standard way to do this.^

Hopefully we can discuss this in a future frontends session..

Jdlrobson renamed this task from Consolidate svgmin config and checker to Consolidate svgmin config and svg / grunt-svgmin checker.Mar 3 2020, 6:58 PM
Jdlrobson added subscribers: Legoktm, Jdforrester-WMF.

From @Jdrewniak on

I'd prefer a solution written in Node.js and the SVGO JS api (an additional benefit being the ability to loop through files asynchronously), offering the best cross-OS compatibility. That being said, I don't think the creation of such a library should be a blocker here.

This should be split up into two tasks:

  1. A Wikimedia specific SVGO config, since v2.n possible as JS based config as dependency
  2. A Wikimedia svg_check as dependency for linting
  1. SVGO and svg_check (or similar) use centralized config
Aklapper added a subscriber: ovasileva.

@ovasileva: Per emails from Sep18 and Oct20 and , I am resetting the assignee of this task because there has not been progress lately (please correct me if I am wrong!). Resetting the assignee avoids the impression that somebody is already working on this task. It also allows others to potentially work towards fixing this task. Please claim this task again when you plan to work on it (via Add Action...Assign / Claim in the dropdown menu) - it would be welcome. Thanks for your understanding!