Skip to content

Commit 9a25c5f

Browse files
authored
refactor: extract cli-config-apple for linking (#2536)
* refactor: extract cli-config-apple for linking * chore: cleanup deps
1 parent 2fc73e7 commit 9a25c5f

36 files changed

+135
-56
lines changed

packages/cli-config-apple/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# @react-native-community/cli-config-apple
2+
3+
This package is part of the [React Native CLI](../../README.md). It contains utilities for building reusable commands targeting Apple platforms.
4+
5+
## Installation
6+
7+
```sh
8+
yarn add @react-native-community/cli-config-apple
9+
```
10+
11+
## Usage
12+
13+
This package is intended to be used internally in [React Native CLI](../../README.md) and by out of tree platforms.
14+
15+
`cli-config-apple` exports utilities to create OOT platform config for autolinking.
16+
17+
- `getProjectConfig()` - creates project config for given platform
18+
- `getDependencyConfig()` - creates dependency config for given platform
19+
20+
Example (`<oot-platform>/packages/react-native/react-native.config.js`):
21+
22+
```js
23+
platforms: {
24+
visionos: {
25+
npmPackageName: '@callstack/react-native-visionos',
26+
projectConfig: getProjectConfig({platformName: 'visionos'}),
27+
dependencyConfig: getDependencyConfig({platformName: 'visionos'}),
28+
},
29+
..
30+
},
31+
```
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "@react-native-community/cli-config-apple",
3+
"version": "15.0.0",
4+
"license": "MIT",
5+
"main": "build/index.js",
6+
"publishConfig": {
7+
"access": "public"
8+
},
9+
"dependencies": {
10+
"@react-native-community/cli-tools": "15.0.0",
11+
"chalk": "^4.1.2",
12+
"execa": "^5.0.0",
13+
"fast-glob": "^3.3.2"
14+
},
15+
"devDependencies": {
16+
"@react-native-community/cli-types": "15.0.0",
17+
"ora": "^5.4.1"
18+
},
19+
"files": [
20+
"build",
21+
"!*.d.ts",
22+
"!*.map"
23+
],
24+
"homepage": "https://github.com/react-native-community/cli/tree/main/packages/cli-config-apple",
25+
"repository": {
26+
"type": "git",
27+
"url": "https://github.com/react-native-community/cli.git",
28+
"directory": "packages/cli-config-apple"
29+
}
30+
}

0 commit comments

Comments
 (0)