Skip to content

Commit 9a2dd8e

Browse files
ergunshDevtools-frontend LUCI CQ
authored andcommitted
[ui] Add "Create widget" VSCode task for scaffolding widgets
After crrev.com/c/6556183 we have a way to scaffold a widget. This CL adds a Task inside VSCode so that we can do it from the VSCode UI. The usage is: * Select ">Tasks: Run Task" in the command palette. * Select "Create Widget" task * Supply the widget path in the prompt. * Supply the widget name. Then, it creates the widget for you in the given path with the given name. Bug: none Change-Id: I42d6676954a3ef4d4bcf820964f9c55757013cf9 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6554646 Commit-Queue: Danil Somsikov <dsv@chromium.org> Reviewed-by: Danil Somsikov <dsv@chromium.org> Auto-Submit: Ergün Erdoğmuş <ergunsh@chromium.org>
1 parent 8dde1c2 commit 9a2dd8e

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.vscode/devtools-workspace-tasks.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,43 @@
2424
}
2525
}
2626
]
27+
},
28+
{
29+
"label": "Create Widget",
30+
"type": "shell",
31+
"command": "node",
32+
"args": [
33+
"${workspaceFolder}/scripts/scaffold/scaffold-widget.js",
34+
"${input:widgetPath}",
35+
"${input:widgetName}"
36+
],
37+
"options": {
38+
"cwd": "${workspaceFolder}"
39+
},
40+
"problemMatcher": [],
41+
"presentation": {
42+
"echo": true,
43+
"reveal": "always",
44+
"focus": false,
45+
"panel": "shared",
46+
"showReuseMessage": false,
47+
"clear": false
48+
},
49+
"group": {
50+
"kind": "build",
51+
"isDefault": false
52+
}
53+
}],
54+
"inputs": [
55+
{
56+
"id": "widgetPath",
57+
"type": "promptString",
58+
"description": "Enter the path to create the widget (e.g., front_end/panels/ai_assistance)"
59+
},
60+
{
61+
"id": "widgetName",
62+
"type": "promptString",
63+
"description": "Enter the WidgetName (PascalCase, e.g., MyWidget)"
2764
}
2865
]
2966
}

0 commit comments

Comments
 (0)