microsoft/vscode-react-native

Public

mirrored from https://github.com/microsoft/vscode-react-nativeAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
sourcemap-handle-null-sections

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

src/extension/services/validationService/checks/expoCli.ts

42lines · modeblame

c7856462Heniker4 years ago1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the MIT license. See LICENSE file in the project root for details.
3
4import * as nls from "vscode-nls";
948a0d44Heniker4 years ago5import { basicCheck, createNotFoundMessage } from "../util";
09f6024fHeniker4 years ago6import { ValidationCategoryE, IValidation, ValidationResultT } from "./types";
c7856462Heniker4 years ago7
8nls.config({
9messageFormat: nls.MessageFormat.bundle,
10bundleFormat: nls.BundleFormat.standalone,
11})();
12
13const toLocale = nls.loadMessageBundle();
14
15const label = "Expo CLI";
16
17async function test(): Promise<ValidationResultT> {
948a0d44Heniker4 years ago18const result = await basicCheck({
19command: "expo-cli",
20});
21
22if (!result.exists) {
c7856462Heniker4 years ago23return {
24status: "failure",
25comment: createNotFoundMessage(label),
26};
27}
28
948a0d44Heniker4 years ago29return { status: "success" };
c7856462Heniker4 years ago30}
31
32const main: IValidation = {
33label,
34description: toLocale(
35"ExpoCliTestDescription",
36"Required for installing and managing Expo applications",
37),
38category: ValidationCategoryE.Expo,
39exec: test,
40};
41
42export default main;