-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathoptions.js
36 lines (35 loc) · 838 Bytes
/
options.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
const path = require("path")
const util = require("util")
module.exports = {
path: "",
globalClasses: "",
defaultClasses: "",
svgSpriteShortcode: "svgsprite",
svgShortcode: "svg",
spriteConfig:
{
mode: {
inline: true,
symbol: {
sprite: 'sprite.svg',
example: false,
},
},
shape: {
transform: ['svgo'],
id: {
generator: (_, file) => {
const path_separator = '--'
const whitespace_separator = '_'
const template = 'svg-%s'
const pathname = file["relative"].split(path.sep).join(path_separator)
return util.format(template, path.basename(pathname.replace(/\s+/g, whitespace_separator), '.svg'));
}
},
},
svg: {
xmlDeclaration: false,
doctypeDeclaration: false,
},
}
};