Skip to content

Commit

Permalink
Add generate.directory command
Browse files Browse the repository at this point in the history
  • Loading branch information
FirentisTFW committed Nov 12, 2023
1 parent 6e394e4 commit 99323ae
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
15 changes: 14 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
{
"command": "widgetbook-generator.generate.widget",
"title": "Create widgetbook entry for this widget"
},
{
"command": "widgetbook-generator.generate.directory",
"title": "Widgetbook: generate entry for each file in the directory"
}
],
"configuration": [
Expand Down Expand Up @@ -69,7 +73,16 @@
}
}
}
]
],
"menus": {
"explorer/context": [
{
"command": "widgetbook-generator.generate.directory",
"group": "widgetbookGroup@1",
"when": "explorerResourceIsFolder"
}
]
}
},
"scripts": {
"esbuild": "npm run esbuild-base -- --sourcemap",
Expand Down
4 changes: 4 additions & 0 deletions src/code_actions/widgetbook_entries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ class WidgetbookEntriesCodeActions implements vscode.CodeActionProvider {
command: "widgetbook-generator.generate.widget",
title: "Create widgetbook entry for this widget",
},
{
command: "widgetbook-generator.generate.directory",
title: "Widgetbook: generate entry for each file in the directory",
},
];

return commands.map((c) => {
Expand Down

0 comments on commit 99323ae

Please sign in to comment.