Files
react-native/packages/core-cli-utils/private/utils.js
T
Blake Friedman 6461dcd07b Port: @react-native-community/cli#clean → @react-native/core-cli-utils#clean (#43287)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43287

Move react-native-community/cli clean into core per RFC-0759.  Provides:

- android
- metro
- npm
- bun
- watchman
- yarn
- cocoapods

These tasks are used to clear up caching artefacts in React Native projects.  This is going to be called by the `react-native-community/cli` once we publish these in an npm package.

Changelog:
[General][Added] RFC-0759 Move cli clean into core

Reviewed By: cipolleschi

Differential Revision: D53997878

fbshipit-source-id: 56907be714184abecc8e3ef677ffc83e9ee7b54d
2024-03-04 04:41:41 -08:00

25 lines
523 B
JavaScript

/**
* 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.
*
* @flow strict-local
* @format
* @oncall react_native
*/
import type {Task} from './types';
import os from 'os';
export function task(label: string, action: Task['action']): Task {
return {
label,
action,
};
}
export const isWindows = os.platform() === 'win32';
export const isMacOS = os.platform() === 'darwin';