-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsvgs.js
58 lines (54 loc) · 1.18 KB
/
svgs.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/**
* Dependencies
*/
const path = require('path');
const resolve = require(path.join(__dirname, '../', 'bin/util/resolve'));
const global = resolve('config/global');
/**
* Plugin options for SVGO
*
* @source https://github.com/svg/svgo#built-in-plugins
*/
const svgo = {
plugins: [
{
name: 'preset-default',
params: {
overrides: {
removeViewBox: false,
convertPathData: false,
inlineStyles: false,
cleanupIDs: false
}
}
}
]
};
/**
* Plugin options for svgstore
*
* @source https://github.com/svgstore/svgstore#options
*/
const svgstore = {};
/**
* Config
*
* @type {Object}
*/
module.exports = [
{
source: path.join(global.base, global.src, global.entry.svg),
dist: path.join(global.base, global.dist, global.entry.svg),
prefix: 'pttrn-',
file: 'svgs.svg',
svgo: svgo,
svgstore: svgstore,
// restrict: [], // Limit the svgs that will be compiled from the source directory and included in the sprite.
// write: {
// source: false // Prevent writing of individual optimized svgs into the dist
// }
},
// {
// ... additional modules...
// }
];