Skip to content

Commit b7e23ef

Browse files
committed
Added run all with defaults and renamed previous task as custom
1 parent da85965 commit b7e23ef

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

manifest.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
{"name": "Rename", "command": "rename"},
99
{"name": "Reorder", "command": "reorder"},
1010
{"name": "Tidy", "command": "tidy"},
11+
{"name": "Run all", "command": "all"},
1112
{"separator": true},
12-
{"name": "Run all...", "command": "options"}
13+
{"name": "Run custom...", "command": "options"}
1314
]
14-
}
15+
}

src/Core.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,12 @@ figma.clientStorage.getAsync('UUID').then(data => {
147147
cmdTidy()
148148
setTimeout(() => figma.closePlugin(), 100)
149149
} else
150+
if (cmd == 'all') {
151+
cmdTidy()
152+
cmdReorder()
153+
cmdRename()
154+
setTimeout(() => figma.closePlugin(), 100)
155+
} else
150156
if (cmd == 'options') {
151157
figma.showUI(__html__, { width: 320, height: 360 })
152158
figma.ui.postMessage({ type: 'init', UUID: UUID, cmd: cmd })

0 commit comments

Comments
 (0)