Skip to content

Commit

Permalink
update svgo config
Browse files Browse the repository at this point in the history
  • Loading branch information
Allenice committed Sep 14, 2018
1 parent 9aee6e1 commit 84a39c8
Show file tree
Hide file tree
Showing 9 changed files with 95 additions and 44 deletions.
14 changes: 11 additions & 3 deletions default/svgo.js
Expand Up @@ -6,6 +6,17 @@ module.exports = {
{
removeTitle: true
},
{
inlineStyles: {
onlyMatchedOnce: false
}
},
{
convertStyleToAttrs: true
},
{
removeStyleElement: true
},
{
removeComments: true
},
Expand All @@ -15,9 +26,6 @@ module.exports = {
{
removeUselessDefs: true
},
{
convertStyleToAttrs: true
},
{
cleanupIDs: {
remove: true,
Expand Down
64 changes: 64 additions & 0 deletions src/assets/svg/gift.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 0 additions & 22 deletions src/assets/svg/setting.svg

This file was deleted.

7 changes: 4 additions & 3 deletions src/common/codeMap.ts
Expand Up @@ -59,10 +59,11 @@ export default {
],
'original-color': [
`
<icon name="colorwheel" width="100" height="100" :original="true"></icon>
<icon name="colorwheel" width="100" height="100" original></icon>
<!-- overwrite original color -->
<icon name="colorwheel" width="100" height="100" :original="true" color="_ black _ black _"></icon>
<icon name="colorwheel" width="100" height="100" :original="true" color="_ r-black _ r-red _"></icon>
<icon name="colorwheel" width="100" height="100" original color="_ black _ black _"></icon>
<icon name="colorwheel" width="100" height="100" original color="_ r-black _ r-red _"></icon>
<icon name="gift" width="100" height="100" original></icon>
`
],
gradient: [
Expand Down
13 changes: 13 additions & 0 deletions src/components/icons/gift.ts
@@ -0,0 +1,13 @@

/* eslint-disable */
/* tslint:disable */
// @ts-ignore
import icon from 'vue-svgicon'
icon.register({
'gift': {
width: 16,
height: 16,
viewBox: '0 0 16 17',
data: '<path pid="0" d="M8.2 3.4L9.6 2 11 3.4l-.7.6.7.7.6-.6c.4-.4.4-1 0-1.4l-1.4-1.4c-.4-.4-1-.4-1.4 0L7.2 2.9l1 .5zM9.6 2L11 3.4l-.7.6.7.7.6-.6c.4-.4.4-1 0-1.4l-1.4-1.4c-.4-.4-1-.4-1.4 0L7.2 2.9l1 .4L9.6 2z" _fill="#ff3465"/><path pid="1" d="M8.8 4.8L5.9 2 4.5 3.4l.7.7-.7.7-.7-.7c-.4-.4-.4-1 0-1.4l1.4-1.4c.4-.4 1-.4 1.4 0l3.5 3.5H8.8zm0 0L5.9 2 4.5 3.4l.7.7-.7.7-.7-.7c-.4-.4-.4-1 0-1.4l1.4-1.4c.4-.4 1-.4 1.4 0l3.5 3.5H8.8zM2 10v6h12v-6H2zm0-1h12c.6 0 1 .4 1 1v6c0 .6-.4 1-1 1H2c-.6 0-1-.4-1-1v-6c0-.6.4-1 1-1z" _fill="#ff3465"/><path pid="2" d="M1 5v4h14V5H1zm0-1h14c.6 0 1 .4 1 1v4c0 .6-.4 1-1 1H1c-.6 0-1-.4-1-1V5c0-.6.4-1 1-1z" _fill="#ff3465"/><linearGradient id="svgicon_gift_a" gradientUnits="userSpaceOnUse" x1="-216.25" y1="391.435" x2="-216.25" y2="392.435" gradientTransform="matrix(4 0 0 -11 873 4321.788)"><stop offset="0" stop-color="#ffd5e0"/><stop offset="1" stop-color="#ff3465"/></linearGradient><path pid="3" _fill="url(#svgicon_gift_a)" d="M6 5h4v11H6z"/>'
}
})
2 changes: 1 addition & 1 deletion src/components/icons/index.ts
Expand Up @@ -3,7 +3,7 @@ import './arrow'
import './check'
import './clock'
import './colorwheel'
import './gift'
import './mask'
import './setting'
import './sora'
import './vue'
13 changes: 0 additions & 13 deletions src/components/icons/setting.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/icons/sora/arrow.ts
Expand Up @@ -8,6 +8,6 @@ icon.register({
width: 200,
height: 200,
viewBox: '0 0 1024 1024',
data: '<defs><style/></defs><path pid="0" d="M165.39 594.774h287.782v263.292l430.622-359.694-430.62-359.706v230.242H165.39v225.866z"/>'
data: '<defs/><path pid="0" d="M165.39 594.774h287.782v263.292l430.622-359.694-430.62-359.706v230.242H165.39v225.866z"/>'
}
})
2 changes: 1 addition & 1 deletion src/components/icons/sora/fit/arrow.ts
Expand Up @@ -8,6 +8,6 @@ icon.register({
width: 254.688,
height: 200,
viewBox: '0 0 1304 1024',
data: '<defs><style/></defs><path pid="0" d="M552.588 0h88.622c137.03 128.838 268.102 264.378 401.408 396.94v20.852C913.036 557.056 778.985 691.107 638.976 819.2h-87.878C654.615 689.617 764.09 564.503 881.012 446.836c-293.422 1.49-587.59-.744-881.012.745v-75.217c293.423 0 586.845-1.49 880.268 0C763.345 255.44 655.36 129.583 552.588 0z"/>'
data: '<defs/><path pid="0" d="M552.588 0h88.622c137.03 128.838 268.102 264.378 401.408 396.94v20.852C913.036 557.056 778.985 691.107 638.976 819.2h-87.878C654.615 689.617 764.09 564.503 881.012 446.836c-293.422 1.49-587.59-.744-881.012.745v-75.217c293.423 0 586.845-1.49 880.268 0C763.345 255.44 655.36 129.583 552.588 0z"/>'
}
})

0 comments on commit 84a39c8

Please sign in to comment.