-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfigma.config.cjs
61 lines (58 loc) · 1.54 KB
/
figma.config.cjs
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
59
60
61
require("dotenv").config();
const fileId = process.env.FILE_ID;
/** @type {import('@figma-export/types').FigmaExportRC} */
module.exports = {
commands: [
// [
// "styles",
// {
// fileId: fileId,
// // version: 'xxx123456', // optional - file's version history is only supported on paid Figma plans
// // onlyFromPages: ['icons'], // optional - Figma page names (all pages when not specified)
// outputters: [
// require("@figma-export/output-styles-as-sass")({
// output: "./src/styles",
// }),
// ],
// },
// ],
[
"components",
{
fileId,
onlyFromPages: ["💜 Icons"],
transformers: [
require("@figma-export/transform-svg-with-svgo")({
plugins: [
{
name: "preset-default",
params: {
overrides: {
removeViewBox: true,
},
},
},
{
name: "addAttributesToSVGElement",
active: true,
},
{
name: "removeDimensions",
active: false,
},
],
}),
],
outputters: [
require("@figma-export/output-components-as-svgr")({
output: "./src",
getFileExtension: () => ".tsx",
getSvgrConfig: () => ({
typescript: true,
}),
}),
],
},
],
],
};