[scaling] build 2.5x svg icons sprite for DE

This commit is contained in:
Maxim Kadushkin
2022-10-18 19:20:32 +03:00
parent 3e985ad22f
commit 6fdaf5b14d
179 changed files with 4270 additions and 18 deletions

View File

@ -241,11 +241,66 @@ module.exports = function (grunt, rootpathprefix) {
scale: '1.75x',
extpath: 'big'
}),
}
},
svg_sprite: {
options: {
svg: {
rootAttributes: {
//xmlns:'http://www.w3.org/2000/svg',
},
},
shape: {
transform: [{
svgo: {
plugins: [
'removeXMLNS',
{
name: "removeAttrs",
params: {
attrs: "(fill|stroke)"
}
},
]
},
}]
},
mode: {
symbol: {
},
},
},
deiconssmall: {
src: [`${_prefix}apps/common/main/resources/img/toolbar/2.5x/*.svg`],
dest: `${_prefix}apps/documenteditor/main/resources/img/`,
options: {
mode: {
symbol: {
inline: true,
dest: './',
sprite: `iconssmall@2.5x.svg`,
},
},
}
},
deiconsbig: {
src: [`${_prefix}apps/common/main/resources/img/toolbar/2.5x/big/*.svg`],
dest: `${_prefix}apps/documenteditor/main/resources/img/`,
options: {
mode: {
symbol: {
inline: true,
dest: './',
sprite: `iconsbig@2.5x.svg`,
},
},
}
},
},
});
// Load in `grunt-spritesmith`
grunt.loadNpmTasks('grunt-spritesmith');
grunt.loadNpmTasks('grunt-svg-sprite');
grunt.registerTask('word-icons', ['sprite:word-1x', 'sprite:word-big-1x', 'sprite:word-huge-1x', 'sprite:word-2x', 'sprite:word-big-2x', 'sprite:word-huge-2x',
'sprite:word1.25x', 'sprite:word-big-1.25x', 'sprite:word-huge-1.25x',
@ -260,6 +315,6 @@ module.exports = function (grunt, rootpathprefix) {
'sprite:cell-1.25x', 'sprite:cell-big-1.25x',
'sprite:cell-1.75x', 'sprite:cell-big-1.75x']);
grunt.registerTask('all-icons-sprite', ['word-icons','slide-icons','cell-icons']);
grunt.registerTask('all-icons-sprite', ['word-icons','slide-icons','cell-icons','svg_sprite']);
grunt.registerTask('default', ['all-icons-sprite']);
};

File diff suppressed because it is too large Load Diff

View File

@ -3,6 +3,7 @@
"version": "0.0.1",
"description": "",
"dependencies": {
"grunt-spritesmith": "^6.10.0"
"grunt-spritesmith": "^6.10.0",
"grunt-svg-sprite": "^2.0.0"
}
}