2016-12-02 05:45:41 -05:00
|
|
|
|
# Default config for SVGO
|
|
|
|
|
#
|
|
|
|
|
# Usage:
|
|
|
|
|
#
|
2016-12-16 02:51:10 -05:00
|
|
|
|
# for d in Papirus/16x16/* Papirus/22x22/* Papirus/24x24/*
|
|
|
|
|
# do
|
|
|
|
|
# svgo --config=_svgo.yml -f "$d"
|
|
|
|
|
# done
|
2016-12-02 05:45:41 -05:00
|
|
|
|
#
|
2016-12-16 02:51:10 -05:00
|
|
|
|
# or
|
2016-12-02 05:45:41 -05:00
|
|
|
|
#
|
2016-12-16 02:51:10 -05:00
|
|
|
|
# svgo --config=_svgo.yml -f Papirus/16x16/actions
|
2016-12-02 05:45:41 -05:00
|
|
|
|
#
|
2016-12-16 02:51:10 -05:00
|
|
|
|
# or
|
2016-12-02 05:45:41 -05:00
|
|
|
|
#
|
2016-12-16 02:51:10 -05:00
|
|
|
|
# svgo --config=_svgo.yml -i FILE
|
2016-12-02 05:45:41 -05:00
|
|
|
|
|
|
|
|
|
full: true
|
|
|
|
|
multipass: true
|
|
|
|
|
|
|
|
|
|
plugins:
|
|
|
|
|
|
|
|
|
|
# removes doctype declaration
|
|
|
|
|
- removeDoctype
|
|
|
|
|
|
|
|
|
|
# removes comments
|
|
|
|
|
- removeComments
|
|
|
|
|
|
|
|
|
|
# removes <metadata>
|
|
|
|
|
- removeMetadata
|
|
|
|
|
|
|
|
|
|
# removes editors namespaces, elements and attributes
|
|
|
|
|
- removeEditorsNSData
|
|
|
|
|
|
|
|
|
|
# cleanups attributes from newlines, trailing and repeating spaces
|
|
|
|
|
- cleanupAttrs
|
|
|
|
|
|
|
|
|
|
# removes unused IDs
|
|
|
|
|
- cleanupIDs:
|
|
|
|
|
minify: false
|
|
|
|
|
|
|
|
|
|
# removes elements in <defs> without id
|
|
|
|
|
- removeUselessDefs
|
|
|
|
|
|
|
|
|
|
# rounds numeric values to the fixed precision
|
2016-12-02 06:26:38 -05:00
|
|
|
|
# opacity="0.72000004" --> opactity=".72"
|
2016-12-02 05:45:41 -05:00
|
|
|
|
# removes default ‘px’ units
|
2016-12-02 06:26:38 -05:00
|
|
|
|
# y="749.936002px" --> y="749.936"
|
2016-12-02 05:45:41 -05:00
|
|
|
|
- cleanupNumericValues:
|
|
|
|
|
floatPrecision: 3
|
|
|
|
|
leadingZero: true
|
|
|
|
|
defaultPx: true
|
|
|
|
|
convertToPx: false
|
|
|
|
|
|
|
|
|
|
# rounds list of values to the fixed precision
|
2016-12-02 06:26:38 -05:00
|
|
|
|
# viewBox="0 0 16px 16px" --> viewBox="0 0 16 16"
|
2016-12-02 05:45:41 -05:00
|
|
|
|
- cleanupListOfValues:
|
|
|
|
|
floatPrecision: 2
|
|
|
|
|
leadingZero: true
|
|
|
|
|
defaultPx: true
|
|
|
|
|
convertToPx: false
|
|
|
|
|
|
|
|
|
|
# converts colors: rgb() to #rrggbb
|
|
|
|
|
- convertColors:
|
|
|
|
|
shorthex: false
|
|
|
|
|
shortname: false
|
|
|
|
|
|
|
|
|
|
# removes unknown elements content and attributes
|
|
|
|
|
# don't touch attrs with default values
|
2016-12-05 16:58:18 -05:00
|
|
|
|
# - removeUnknownsAndDefaults:
|
|
|
|
|
# defaultAttrs: false
|
2016-12-02 05:45:41 -05:00
|
|
|
|
|
|
|
|
|
# remove or cleanup enable-background attribute when possible
|
|
|
|
|
- cleanupEnableBackground
|
|
|
|
|
|
|
|
|
|
# removes empty <text> elements
|
|
|
|
|
- removeEmptyText
|
|
|
|
|
|
|
|
|
|
# removes empty attributes
|
|
|
|
|
- removeEmptyAttrs
|
|
|
|
|
|
|
|
|
|
# removes empty container elements
|
|
|
|
|
- removeEmptyContainers
|
|
|
|
|
|
|
|
|
|
# removes unused namespaces declaration
|
|
|
|
|
- removeUnusedNS
|
|
|
|
|
|
|
|
|
|
# removes <desc> (only non-meaningful by default)
|
|
|
|
|
- removeDesc
|
|
|
|
|
|
|
|
|
|
# configure the indent (default 4 spaces) used by `--pretty` here:
|
|
|
|
|
#
|
|
|
|
|
# @see https://github.com/svg/svgo/blob/master/lib/svgo/js2svg.js#L6 for more config options
|
|
|
|
|
#
|
|
|
|
|
js2svg:
|
|
|
|
|
pretty: true
|
2017-01-08 02:18:22 -05:00
|
|
|
|
indent: ' '
|