Skip to content

Commit 16f9e0b

Browse files
committed
Update lib reference
Fix PR comments
1 parent c44b18d commit 16f9e0b

File tree

5 files changed

+11
-12
lines changed

5 files changed

+11
-12
lines changed

lib/commands/debug.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@
2222
let debugData = this.$debugDataService.createDebugData(this.$projectData, this.$options);
2323

2424
await this.$platformService.trackProjectType(this.$projectData);
25-
const devices = this.$devicesService.getDeviceInstances();
2625

2726
if (this.$options.start) {
28-
return this.$debugLiveSyncService.printDebugInformation([await this.debugService.debug(debugData, debugOptions)]);
27+
return this.$debugLiveSyncService.printDebugInformation(await this.debugService.debug(debugData, debugOptions));
2928
}
3029

3130
this.$config.debugLivesync = true;
3231

3332
await this.$devicesService.detectCurrentlyAttachedDevices();
3433

3534
// Now let's take data for each device:
35+
const devices = this.$devicesService.getDeviceInstances();
3636
const deviceDescriptors: ILiveSyncDeviceInfo[] = devices.filter(d => !this.platform || d.deviceInfo.platform === this.platform)
3737
.map(d => {
3838
const info: ILiveSyncDeviceInfo = {

lib/common

lib/definitions/livesync.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ interface IDebugLiveSyncService extends ILiveSyncService {
174174
* @param {string[]} information Array of information to be printed. Note that false-like values will be stripped from the array.
175175
* @returns {void}
176176
*/
177-
printDebugInformation(information: string[]): void;
177+
printDebugInformation(information: string): void;
178178
}
179179

180180
interface ILiveSyncWatchInfo {

lib/services/livesync/debug-livesync-service.ts

+6-7
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class DebugLiveSyncService extends LiveSyncService implements IDebugLiveS
5252
await this.$platformService.trackProjectType(this.$projectData);
5353

5454
if (this.$options.start) {
55-
return this.printDebugInformation([await debugService.debug(debugData, debugOptions)]);
55+
return this.printDebugInformation(await debugService.debug(debugData, debugOptions));
5656
}
5757

5858
const deviceAppData = liveSyncResultInfo.deviceAppData;
@@ -66,14 +66,13 @@ export class DebugLiveSyncService extends LiveSyncService implements IDebugLiveS
6666
const buildConfig: IBuildConfig = _.merge({ buildForDevice: !deviceAppData.device.isEmulator }, deployOptions);
6767
debugData.pathToAppPackage = this.$platformService.lastOutputPath(debugService.platform, buildConfig, projectData);
6868

69-
this.printDebugInformation([await debugService.debug(debugData, debugOptions)]);
69+
this.printDebugInformation(await debugService.debug(debugData, debugOptions));
7070
}
7171

72-
public printDebugInformation(information: string[]): void {
73-
information = information.filter(i => !!i);
74-
_.each(information, i => {
75-
this.$logger.info(`To start debugging, open the following URL in Chrome:${EOL}${i}${EOL}`.cyan);
76-
});
72+
public printDebugInformation(information: string): void {
73+
if (!!information) {
74+
this.$logger.info(`To start debugging, open the following URL in Chrome:${EOL}${information}${EOL}`.cyan);
75+
}
7776
}
7877
}
7978

test/plugins-service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ describe("Plugins service", () => {
391391
}
392392
},
393393
"devDependencies": {
394-
"grunt": "0.4.`2`"
394+
"grunt": "0.4.2"
395395
}
396396
};
397397
let fs = testInjector.resolve("fs");

0 commit comments

Comments
 (0)