chore: add svg transformation task
|
@ -12,11 +12,21 @@ import del from 'del';
|
||||||
|
|
||||||
import iconsColors from '../../icons/colors.js';
|
import iconsColors from '../../icons/colors.js';
|
||||||
|
|
||||||
|
console.log(iconsColors);
|
||||||
|
|
||||||
Gulp.task('process:icons', () => {
|
Gulp.task('process:icons', () => {
|
||||||
del([`${Paths.icons}/svg/*.svg`]).then(paths => {
|
del([`${Paths.icons}/svg/*.svg`]).then(paths => {
|
||||||
console.log('[ ⚙️ Deleting all icons]\n'.bold.red);
|
console.log('[ 🔥 Deleting all icons]\n'.bold.red);
|
||||||
});
|
});
|
||||||
Gulp.src(`${Paths.src}/icons/*.svg`)
|
Gulp.src(`${Paths.src}/icons/*.svg`)
|
||||||
.pipe(Colorize(iconsColors))
|
.pipe(Colorize({
|
||||||
|
colors: iconsColors,
|
||||||
|
replaceColor: function (content, hex) {
|
||||||
|
return content.replace('#000', '#' + hex);
|
||||||
|
},
|
||||||
|
replacePath: function (path, colorKey) {
|
||||||
|
return path.replace(/\.svg/, '.svg');
|
||||||
|
}
|
||||||
|
}))
|
||||||
.pipe(Gulp.dest(`${Paths.icons}/svg`));
|
.pipe(Gulp.dest(`${Paths.icons}/svg`));
|
||||||
});
|
});
|
|
@ -1,34 +1,25 @@
|
||||||
const iconsColors ={
|
/* Color Palette:
|
||||||
colors: {
|
* green: '90A959',
|
||||||
// Specific files
|
* blue: '6A9FB5',
|
||||||
actionscript: {
|
* blueDesaturated: '78909C',
|
||||||
pink: 'FF00FF'
|
* red: 'AC4142',
|
||||||
}
|
* redLight: 'D14748',
|
||||||
},
|
* maroon: 'AB7558',
|
||||||
replaceColor: function (content, hex) {
|
* limeGreen: 'B8E15E',
|
||||||
return content.replace('#000', '#' + hex);
|
* greenTea: '2ECC71',
|
||||||
},
|
* purple: 'AA759F',
|
||||||
replacePath: function (path, colorKey) {
|
* purpleDark: '8251A8',
|
||||||
return path.replace(/\.svg/, '.svg');
|
* yellow: 'F4BF75',
|
||||||
|
* teal: '80CBC4',
|
||||||
|
* orange: 'D28445',
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var iconsColors = {
|
||||||
|
actionscript: {
|
||||||
|
pink: 'FF00FF'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
default: {
|
|
||||||
green: '90A959',
|
|
||||||
blue: '6A9FB5',
|
|
||||||
blueDesaturated: '78909C',
|
|
||||||
red: 'AC4142',
|
|
||||||
redLight: 'D14748',
|
|
||||||
maroon: 'AB7558',
|
|
||||||
limeGreen: 'B8E15E',
|
|
||||||
greenTea: '2ECC71',
|
|
||||||
purple: 'AA759F',
|
|
||||||
purpleDark: '8251A8',
|
|
||||||
yellow: 'F4BF75',
|
|
||||||
teal: '80CBC4',
|
|
||||||
orange: 'D28445',
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
export default iconsColors;
|
export default iconsColors;
|
Before Width: | Height: | Size: 415 B After Width: | Height: | Size: 415 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 430 B After Width: | Height: | Size: 430 B |
Before Width: | Height: | Size: 624 B After Width: | Height: | Size: 624 B |
Before Width: | Height: | Size: 733 B After Width: | Height: | Size: 733 B |
Before Width: | Height: | Size: 518 B After Width: | Height: | Size: 518 B |
Before Width: | Height: | Size: 502 B After Width: | Height: | Size: 502 B |
Before Width: | Height: | Size: 5 KiB After Width: | Height: | Size: 5 KiB |