-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode.js
More file actions
32 lines (26 loc) · 645 Bytes
/
code.js
File metadata and controls
32 lines (26 loc) · 645 Bytes
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
function selection(index) {
if (index !== undefined) {
return figma.currentPage.selection[index] || null;
} else {
return figma.currentPage.selection;
}
}
function print(content) {
console.log(content);
}
async function customScripts() {
print("========> Running scripts");
// Custom scripts will be added to here
// Use VSCode to open this folder
// Write you code in this file
let names = []
selection().map(node => {
names.push(node.name)
})
print("123123")
figma.notify("Selected layer: " + names.join(","))
// Custom scripts end
figma.closePlugin();
print("========> Scripts complete");
}
customScripts();