nbotond20/SVG Color Replace

Replace colors in SVG files with CSS variables from a JSON file token set

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
svg-folder-pathThe path to the folder containing the SVG files to processyes
token-set-input-pathsThe path to the JSON file containing the token setyes
base-token-set-input-pathThe path to the JSON file containing the base token setyes
dry-runIf true, the action will not write any files, only log the changes that would be madenofalse
token-set-keysThe keys in the token set to use for the color replacement (e.g. "color.primary")no
prefer-deep-keyIf true, the action will prefer a deep key in the token set (e.g. "color.primary.500") over a shallow key (e.g. "color.primary")nofalse
file-extensionsThe file extensions to process (e.g. ".svg, .tsx")no
inject-into-htmlIf true, the action will inject the CSS variables into the head of the HTML filenofalse
html-pathThe path to the HTML file to inject the CSS variables intono
css-file-output-folder-pathThe path to the folder to output the CSS file tono
css-file-href-prefixThe prefix to add to the CSS file href in the HTML fileno
svg-output-folder-pathThe path to the folder to output the SVG files tono
mark-generated-filesIf true, the action will add .generated to the file name of the generated filesnofalse

no outputs