@radhya/mach 2.1.11 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -48,6 +48,24 @@ Allowed values:
48
48
  - `expo`
49
49
  - `flutter`
50
50
 
51
+ ## Monorepos
52
+
53
+ Framework selection and project layout are independent. For a mobile app inside
54
+ an npm or Yarn workspace, keep the lockfile and `mach.config.json` at the
55
+ repository root and set an explicit app directory:
56
+
57
+ ```json
58
+ {
59
+ "framework": "expo",
60
+ "appDirectory": "apps/mobile"
61
+ }
62
+ ```
63
+
64
+ Use the same `appDirectory` with `"react-native"` for a bare React Native app.
65
+ Mach installs workspace dependencies from the repository root and runs
66
+ framework-native commands from the selected app. If `appDirectory` is omitted,
67
+ it defaults to `"."`, preserving existing root-level behavior.
68
+
51
69
  Aliases such as `reactnative` and `react_native` are normalized to `react-native`, but new projects should use the canonical `react-native` value.
52
70
 
53
71
  ## Common Commands
@@ -9,6 +9,7 @@ Use this guide when your app is an Expo project and Mach should run Expo prebuil
9
9
  ```json
10
10
  {
11
11
  "framework": "expo",
12
+ "appDirectory": ".",
12
13
  "ios": {
13
14
  "bundleIdentifier": "com.example.app",
14
15
  "buildNumber": "auto"
@@ -92,6 +93,30 @@ my-app/
92
93
 
93
94
  Mach can run Expo prebuild when native folders are absent or need to be regenerated. If you commit native folders and do not want them regenerated, use `framework: "react-native"` instead.
94
95
 
96
+ For an Expo app inside a workspace, keep the lockfile and `mach.config.json` at
97
+ the repository root and point Mach at the app:
98
+
99
+ ```text
100
+ my-workspace/
101
+ mach.config.json
102
+ package.json
103
+ package-lock.json
104
+ apps/
105
+ mobile/
106
+ package.json
107
+ app.json or app.config.*
108
+ ```
109
+
110
+ ```json
111
+ {
112
+ "framework": "expo",
113
+ "appDirectory": "apps/mobile"
114
+ }
115
+ ```
116
+
117
+ Dependency installation remains at the workspace root. Expo prebuild and native
118
+ compilation run from `apps/mobile`.
119
+
95
120
  ## App Versioning
96
121
 
97
122
  For Android store builds, set:
@@ -9,6 +9,7 @@ Use this guide when your project is a vanilla React Native app with committed `i
9
9
  ```json
10
10
  {
11
11
  "framework": "react-native",
12
+ "appDirectory": ".",
12
13
  "ios": {
13
14
  "bundleIdentifier": "com.example.app",
14
15
  "buildNumber": "auto"
@@ -74,6 +75,32 @@ my-app/
74
75
 
75
76
  Android should include `android/gradlew`. iOS should include a usable workspace or project. If multiple iOS schemes exist, set the scheme explicitly.
76
77
 
78
+ For a bare React Native app inside a workspace, keep the lockfile and
79
+ `mach.config.json` at the repository root:
80
+
81
+ ```text
82
+ my-workspace/
83
+ mach.config.json
84
+ package.json
85
+ package-lock.json
86
+ apps/
87
+ mobile/
88
+ package.json
89
+ ios/
90
+ android/
91
+ ```
92
+
93
+ ```json
94
+ {
95
+ "framework": "react-native",
96
+ "appDirectory": "apps/mobile"
97
+ }
98
+ ```
99
+
100
+ Mach installs workspace dependencies at `my-workspace/`, then runs Gradle,
101
+ CocoaPods, and Xcode from `apps/mobile`. Existing root-level projects can omit
102
+ `appDirectory`; it defaults to `"."`.
103
+
77
104
  ## iOS Notes
78
105
 
79
106
  Mach uses the existing native iOS project. If multiple schemes exist, set the scheme in config:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radhya/mach",
3
- "version": "2.1.11",
3
+ "version": "2.2.0",
4
4
  "description": "Mach CLI: Cloud Build Orchestrator for React Native & Expo",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",