-
-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy path.figmaexportrc.example.js
More file actions
56 lines (52 loc) · 1.68 KB
/
.figmaexportrc.example.js
File metadata and controls
56 lines (52 loc) · 1.68 KB
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
// @ts-check
import outputComponentsAsSvg from '@figma-export/output-components-as-svg';
import outputStylesAsSass from '@figma-export/output-styles-as-sass';
import transformSvgWithSvgo from '@figma-export/transform-svg-with-svgo';
/** @type { import('@figma-export/types').StylesCommandOptions } */
const styleOptions = {
fileId: 'fzYhvQpqwhZDUImRz431Qo',
// version: 'xxx123456', // optional - file's version history is only supported on paid Figma plans
// ids: ['138:52'], // optional - Export only specified node IDs (the `onlyFromPages` option is always ignored when set)
// onlyFromPages: ['icons'], // optional - Figma page names or IDs (all pages when not specified)
outputters: [
outputStylesAsSass({
output: './output',
}),
],
};
/** @type { import('@figma-export/types').ComponentsCommandOptions } */
const componentOptions = {
fileId: 'fzYhvQpqwhZDUImRz431Qo',
// version: 'xxx123456', // optional - file's version history is only supported on paid Figma plans
// ids: ['54:22'], // optional - Export only specified node IDs (the `onlyFromPages` option is always ignored when set)
onlyFromPages: ['icons'],
transformers: [
transformSvgWithSvgo({
plugins: [
{
name: 'preset-default',
params: {
overrides: {
removeViewBox: false,
},
},
},
{
name: 'removeDimensions',
},
],
}),
],
outputters: [
outputComponentsAsSvg({
output: './output',
}),
],
};
/** @type { import('@figma-export/types').FigmaExportRC } */
export default {
commands: [
['styles', styleOptions],
['components', componentOptions],
],
};