mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
6461dcd07b
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
25 lines
523 B
JavaScript
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';
|