microsoft/vscode-react-native
Publicmirrored from https://github.com/microsoft/vscode-react-nativeAvailable
src/common/codepush/codePushProjectHelper.ts
17lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | // Licensed under the MIT license. See LICENSE file in the project root for details. |
| 3 | |
| 4 | import * as Q from "q"; |
| 5 | import * as fs from "fs"; |
| 6 | import * as path from "path"; |
| 7 | |
| 8 | export default class CodePushProjectHelper { |
| 9 | |
| 10 | public static isCodePushProject(projectRoot: string): Q.Promise<boolean> { |
| 11 | if (!projectRoot || !fs.existsSync(path.join(projectRoot, "package.json"))) { |
| 12 | return Q<boolean>(false); |
| 13 | } |
| 14 | |
| 15 | return Q<boolean>(true); |
| 16 | } |
| 17 | } |