Cordova telemetry command
This commit is contained in:
Родитель
6bac2b3057
Коммит
86242105a8
|
@ -117,6 +117,12 @@
|
|||
"title": "Cordova: Clean",
|
||||
"category": "Cordova",
|
||||
"enablement": "!config.security.workspace.trust.enabled || isWorkspaceTrusted"
|
||||
},
|
||||
{
|
||||
"command": "cordova.telemetry",
|
||||
"title": "%cordova.telemetry%",
|
||||
"category": "Cordova",
|
||||
"enablement": "!config.security.workspace.trust.enabled || isWorkspaceTrusted"
|
||||
}
|
||||
],
|
||||
"keybindings": [
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
"cordova.requirements": "Cordova: Requirements",
|
||||
"cordova.simulate.android": "Cordova: Simulate Android in browser",
|
||||
"cordova.simulate.ios": "Cordova: Simulate iOS in browser",
|
||||
"cordova.telemetry": "Cordova: Telemetry",
|
||||
"cordova.ionic.build": "Ionic: Build",
|
||||
"cordova.ionic.run": "Ionic: Run",
|
||||
"cordova.ionic.prepare": "Ionic: Prepare",
|
||||
|
|
|
@ -12,3 +12,4 @@ export * from "./ionicRun";
|
|||
export * from "./simulateAndroid";
|
||||
export * from "./simulateIos";
|
||||
export * from "./clean";
|
||||
export * from "./telemetry";
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for details.
|
||||
|
||||
import { window } from "vscode";
|
||||
import { CordovaCommandHelper } from "../../utils/cordovaCommandHelper";
|
||||
import { commandWrapper } from "./commandUtil";
|
||||
|
||||
export class Telemetry {
|
||||
static codeName = "cordova.telemetry";
|
||||
static createHandler = () => {
|
||||
window.showQuickPick(["On", "Off"]).then(value => {
|
||||
commandWrapper(CordovaCommandHelper.executeCordovaCommand, [
|
||||
`telemetry ${value.toLowerCase()}`,
|
||||
]);
|
||||
});
|
||||
};
|
||||
}
|
Загрузка…
Ссылка в новой задаче