UNPKG

@react-native/core-cli-utils

Version:
60 lines (58 loc) 1.8 kB
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * * @format */ import type { Task } from "./types"; import type { ExecaPromise, Options as ExecaOptions } from "execa"; /** * Removes the contents of a directory matching a given pattern, but keeps the directory. * @private */ export declare function deleteDirectoryContents( directory: string, filePattern: RegExp, ): () => Promise<void>; /** * Removes a directory recursively. * @private */ export declare function deleteDirectory(directory: string): () => Promise<void>; /** * Deletes the contents of the tmp directory matching a given pattern. * @private */ export declare function deleteTmpDirectoryContents( filepattern: RegExp, ): () => Promise<void>; type CocoaPodsClean = { clean: Task<ExecaPromise> }; type AndroidClean = { validate: Task<void>; run: Task<ExecaPromise> }; type MetroClean = { metro: Task<Promise<void>>; haste: Task<Promise<void>>; react_native: Task<Promise<void>>; }; type NpmClean = { node_modules: Task<Promise<void>>; verify_cache: Task<ExecaPromise>; }; type WatchmanClean = { stop: Task<ExecaPromise>; cache: Task<ExecaPromise> }; type YarnClean = { clean: Task<ExecaPromise> }; type CleanTasks = { android: ( andoirdSrcDir: null | undefined | string, opts?: ExecaOptions, ) => AndroidClean; cocoapods: CocoaPodsClean; metro: () => MetroClean; npm: (projectRootDir: string) => NpmClean; watchman: (projectRootDir: string) => WatchmanClean; yarn: (projectRootDir: string) => YarnClean; cocoapods?: (projectRootDir: string) => CocoaPodsClean; }; export declare const tasks: CleanTasks; export declare type tasks = typeof tasks;