Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/commands/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export class PreviewCommand implements ICommand {
private static MIN_SUPPORTED_WEBPACK_VERSION = "0.17.0";

constructor(private $bundleValidatorHelper: IBundleValidatorHelper,
private $errors: IErrors,
private $liveSyncService: ILiveSyncService,
private $networkConnectivityValidator: INetworkConnectivityValidator,
private $projectData: IProjectData,
Expand All @@ -27,6 +28,10 @@ export class PreviewCommand implements ICommand {
}

public async canExecute(args: string[]): Promise<boolean> {
if (args && args.length) {
this.$errors.fail(`The arguments '${args.join(" ")}' are not valid for the preview command.`);
}

await this.$networkConnectivityValidator.validate();
this.$bundleValidatorHelper.validate(PreviewCommand.MIN_SUPPORTED_WEBPACK_VERSION);
return true;
Expand Down