Skip to content

Commit

Permalink
chore: migrate build/run commands to @rnx-kit/cli
Browse files Browse the repository at this point in the history
  • Loading branch information
tido64 committed Oct 7, 2024
1 parent 4ea13f8 commit 3c54bd6
Show file tree
Hide file tree
Showing 2 changed files with 307 additions and 19 deletions.
68 changes: 53 additions & 15 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android --no-packager",
"build:android": "react-native bundle --entry-file index.ts --platform android --dev true --bundle-output dist/main.android.jsbundle --assets-dest dist/res",
"build:ios": "react-native bundle --entry-file index.ts --platform ios --dev true --bundle-output dist/main.ios.jsbundle --assets-dest dist",
"build:macos": "react-native bundle --entry-file index.ts --platform macos --dev true --bundle-output dist/main.macos.jsbundle --assets-dest dist",
"build:visionos": "react-native bundle --entry-file index.ts --platform ios --dev true --bundle-output dist/main.visionos.jsbundle --assets-dest dist",
"build:windows": "react-native bundle --entry-file index.ts --platform windows --dev true --bundle-output dist/main.windows.bundle --assets-dest dist",
"ci:windows": "react-native run-windows --logging --no-packager --no-launch --no-deploy --msbuildprops UseBundle=false --no-telemetry",
"android": "rnx-cli run --platform android",
"build:android": "rnx-cli bundle --platform android",
"build:ios": "rnx-cli bundle --platform ios",
"build:macos": "rnx-cli bundle --platform macos",
"build:visionos": "rnx-cli bundle --platform ios",
"build:windows": "rnx-cli bundle --platform windows",
"ci:windows": "rnx-cli run-windows --logging --no-packager --no-launch --no-deploy --msbuildprops UseBundle=false --no-telemetry",
"clean": "yarn workspace react-native-test-app clean",
"ios": "react-native run-ios --no-packager",
"macos": "react-native run-macos --no-packager --scheme Example",
"ios": "rnx-cli run --platform ios",
"macos": "rnx-cli run --platform macos",
"set-react-version": "yarn workspace react-native-test-app set-react-version",
"start": "react-native start",
"visionos": "react-native run-visionos --no-packager",
"windows": "react-native run-windows --no-packager"
"start": "rnx-cli start",
"visionos": "rnx-cli run --platform visionos",
"windows": "rnx-cli run-windows --no-packager"
},
"dependencies": {
"@callstack/react-native-visionos": "^0.75.0",
Expand All @@ -32,6 +32,7 @@
"@react-native-community/cli": "^14.0.0",
"@react-native/babel-preset": "^0.75.0",
"@react-native/metro-config": "^0.75.0",
"@rnx-kit/cli": "^0.18.2",
"@rnx-kit/metro-config": "^2.0.0",
"@rnx-kit/polyfills": "^0.2.0",
"@rnx-kit/tsconfig": "^2.0.0",
Expand All @@ -45,10 +46,47 @@
"eslintConfig": {
"extends": "../.github/eslint.config.js"
},
"rnx-kit//disabled": {
"//": "This configuration is only used for Viewfinder",
"rnx-kit": {
"kitType": "app",
"alignDeps": {
"bundle": [
{
"id": "main",
"entryFile": "index.ts",
"assetsDest": "dist",
"targets": [
"android",
"ios",
"macos",
"visionos",
"windows"
],
"platforms": {
"android": {
"bundleOutput": "dist/main.android.jsbundle",
"sourcemapOutput": "dist/main.android.jsbundle.map",
"assetsDest": "dist/res"
},
"ios": {
"bundleOutput": "dist/main.ios.jsbundle",
"sourcemapOutput": "dist/main.ios.jsbundle.map"
},
"macos": {
"bundleOutput": "dist/main.macos.jsbundle",
"sourcemapOutput": "dist/main.macos.jsbundle.map"
},
"visionos": {
"bundleOutput": "dist/main.visionos.jsbundle",
"sourcemapOutput": "dist/main.visionos.jsbundle.map"
},
"windows": {
"bundleOutput": "dist/main.windows.bundle",
"sourcemapOutput": "dist/main.windows.bundle.map"
}
}
}
],
"alignDeps//disabled": {
"//": "This configuration is only used for Viewfinder",
"requirements": [
"[email protected]"
],
Expand Down
Loading

0 comments on commit 3c54bd6

Please sign in to comment.