Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: local commands parameters #134

Merged
merged 1 commit into from
Mar 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions packages/react-native/local-cli/localCommands.js
Original file line number Diff line number Diff line change
@@ -1,43 +1,45 @@
const {
buildOptions,
createBuild,
createLog,
createRun,
logOptions,
runOptions,
getRunOptions,
getLogOptions,
getBuildOptions,
} = require('@react-native-community/cli-platform-apple');

const platformName = 'visionos';

const run = {
name: 'run-visionos',
description: 'builds your app and starts it on visionOS simulator',
func: createRun({platformName: 'visionos'}),
func: createRun({platformName}),
examples: [
{
desc: 'Run on a specific simulator',
cmd: 'npx @callstack/react-native-visionos run-visionos --simulator "Apple Vision Pro"',
},
],
options: runOptions,
options: getRunOptions({platformName}),
};

const log = {
name: 'log-visionos',
description: 'starts visionOS device syslog tail',
func: createLog({platformName: 'visionos'}),
options: logOptions,
options: getLogOptions({platformName}),
};

const build = {
name: 'build-visionos',
description: 'builds your app for visionOS platform',
func: createBuild({platformName: 'visionos'}),
func: createBuild({platformName}),
examples: [
{
desc: 'Build the app for all visionOS devices in Release mode',
cmd: 'npx @callstack/react-native-visionos build-visionos --mode "Release"',
},
],
options: buildOptions,
options: getBuildOptions({platformName}),
};

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