Skip to content

Commit

Permalink
fix(vscode): add back command activation (uber#3063)
Browse files Browse the repository at this point in the history
  • Loading branch information
gergelyke authored Mar 18, 2020
1 parent 50e6f6a commit 0286c80
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 4 deletions.
49 changes: 48 additions & 1 deletion packages/baseweb-vscode-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,54 @@
"onLanguage:javascript",
"onLanguage:javascriptreact",
"onLanguage:typescript",
"onLanguage:typescriptreact"
"onLanguage:typescriptreact",
"onCommand:extension.baseweb.docs.icon",
"onCommand:extension.baseweb.docs.popover",
"onCommand:extension.baseweb.docs.card",
"onCommand:extension.baseweb.docs.button",
"onCommand:extension.baseweb.docs.button-group",
"onCommand:extension.baseweb.docs.modal",
"onCommand:extension.baseweb.docs.menu",
"onCommand:extension.baseweb.docs.checkbox",
"onCommand:extension.baseweb.docs.tooltip",
"onCommand:extension.baseweb.docs.spinner",
"onCommand:extension.baseweb.docs.pagination",
"onCommand:extension.baseweb.docs.input",
"onCommand:extension.baseweb.docs.select",
"onCommand:extension.baseweb.docs.tag",
"onCommand:extension.baseweb.docs.tabs",
"onCommand:extension.baseweb.docs.table",
"onCommand:extension.baseweb.docs.radio",
"onCommand:extension.baseweb.docs.textarea",
"onCommand:extension.baseweb.docs.progress-bar",
"onCommand:extension.baseweb.docs.slider",
"onCommand:extension.baseweb.docs.toast",
"onCommand:extension.baseweb.docs.accordion",
"onCommand:extension.baseweb.docs.block",
"onCommand:extension.baseweb.docs.avatar",
"onCommand:extension.baseweb.docs.breadcrumbs",
"onCommand:extension.baseweb.docs.header-navigation",
"onCommand:extension.baseweb.docs.notification",
"onCommand:extension.baseweb.docs.progress-steps",
"onCommand:extension.baseweb.docs.rating",
"onCommand:extension.baseweb.docs.file-uploader",
"onCommand:extension.baseweb.docs.datepicker",
"onCommand:extension.baseweb.docs.dnd-list",
"onCommand:extension.baseweb.docs.typography",
"onCommand:extension.baseweb.docs.side-navigation",
"onCommand:extension.baseweb.docs.layer",
"onCommand:extension.baseweb.docs.flex-grid",
"onCommand:extension.baseweb.docs.heading",
"onCommand:extension.baseweb.docs.phone-input",
"onCommand:extension.baseweb.docs.payment-card",
"onCommand:extension.baseweb.docs.pin-code",
"onCommand:extension.baseweb.docs.drawer",
"onCommand:extension.baseweb.docs.list",
"onCommand:extension.baseweb.docs.tree-view",
"onCommand:extension.baseweb.docs.data-table",
"onCommand:extension.baseweb.docs.table-semantic",
"onCommand:extension.baseweb.docs.table-grid",
"onCommand:extension.baseweb.docs.layout-grid"
],
"main": "./build/extension.js",
"contributes": {
Expand Down
6 changes: 3 additions & 3 deletions packages/baseweb-vscode-extension/scripts/update-package.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ const packageJson = require(path.resolve(__dirname, '../package.json'));
components.forEach(component => {
// making sure there are no duplicates
const command = `extension.baseweb.docs.${component}`;
// if (!packageJson.activationEvents.includes(`onCommand:${command}`)) {
// packageJson.activationEvents.push(`onCommand:${command}`);
// }
if (!packageJson.activationEvents.includes(`onCommand:${command}`)) {
packageJson.activationEvents.push(`onCommand:${command}`);
}

const hasCommand =
packageJson.contributes.commands.filter(cmd => {
Expand Down

0 comments on commit 0286c80

Please sign in to comment.