Skip to content

Commit 0fcab8a

Browse files
committed
fix: local commands parameters (#134)
1 parent f175ec9 commit 0fcab8a

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,45 @@
11
const {
2-
buildOptions,
32
createBuild,
43
createLog,
54
createRun,
6-
logOptions,
7-
runOptions,
5+
getRunOptions,
6+
getLogOptions,
7+
getBuildOptions,
88
} = require('@react-native-community/cli-platform-apple');
99

10+
const platformName = 'visionos';
11+
1012
const run = {
1113
name: 'run-visionos',
1214
description: 'builds your app and starts it on visionOS simulator',
13-
func: createRun({platformName: 'visionos'}),
15+
func: createRun({platformName}),
1416
examples: [
1517
{
1618
desc: 'Run on a specific simulator',
1719
cmd: 'npx @callstack/react-native-visionos run-visionos --simulator "Apple Vision Pro"',
1820
},
1921
],
20-
options: runOptions,
22+
options: getRunOptions({platformName}),
2123
};
2224

2325
const log = {
2426
name: 'log-visionos',
2527
description: 'starts visionOS device syslog tail',
2628
func: createLog({platformName: 'visionos'}),
27-
options: logOptions,
29+
options: getLogOptions({platformName}),
2830
};
2931

3032
const build = {
3133
name: 'build-visionos',
3234
description: 'builds your app for visionOS platform',
33-
func: createBuild({platformName: 'visionos'}),
35+
func: createBuild({platformName}),
3436
examples: [
3537
{
3638
desc: 'Build the app for all visionOS devices in Release mode',
3739
cmd: 'npx @callstack/react-native-visionos build-visionos --mode "Release"',
3840
},
3941
],
40-
options: buildOptions,
42+
options: getBuildOptions({platformName}),
4143
};
4244

4345
module.exports = [run, log, build];

0 commit comments

Comments
 (0)