-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
44 lines (35 loc) · 822 Bytes
/
main.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
/**
* @preserve
* Filename: main.js
*
* Created: 07/12/2024 (18:32:24)
* Created by: Lorenzo Saibal Forti <lorenzo.forti@gmail.com>
*
* Last update: 22/12/2024 (13:01:34)
* Updated by: Lorenzo Saibal Forti <lorenzo.forti@gmail.com>
*
* Copyleft: 2024 - Tutti i diritti riservati
*
* Comments:
*/
const getSvg = require("./src/getSvg.js");
const pkg = require("./package.json");
const toLog = require("./src/log.js");
const defaultConfig = {
"includeExt": false,
"embed": true,
"defaultSize": 100
};
module.exports = (eleventyconfig, config = {}) => {
try {
// merge defaultConfig with custom config
const pluginConfig = {
...defaultConfig,
...config
};
eleventyconfig.versionCheck(pkg["11ty"].compatibility);
getSvg(eleventyconfig, pluginConfig);
} catch (err) {
toLog(err, "error");
}
};