|
7 | 7 | - mint |
8 | 8 | - xcbeautify |
9 | 9 | - jq |
| 10 | + - swiftlint |
| 11 | + - sccache |
10 | 12 | - ruby |
11 | 13 | - custom: |
12 | 14 | name: Install bundle packages |
|
50 | 52 | ([ -f "./platforms/swift/Samples/MobileBuyIntegration/MobileBuyIntegration/MobileBuyIntegration.entitlements" ] || exit 1;) |
51 | 53 | meet: cd platforms/swift && ./Scripts/setup_entitlements |
52 | 54 |
|
| 55 | + - node: |
| 56 | + version: v22.14.0 |
| 57 | + package_manager: pnpm@10.33.1 |
| 58 | + packages: |
| 59 | + - platforms/react-native |
| 60 | + - custom: |
| 61 | + name: Install NPM dependencies (React Native) |
| 62 | + met?: ls -l platforms/react-native | grep node_modules |
| 63 | + meet: cd platforms/react-native && pnpm install |
| 64 | + - custom: |
| 65 | + name: Install gems (React Native sample) |
| 66 | + met?: (cd platforms/react-native/sample/ios && bundle check) |
| 67 | + meet: cd platforms/react-native/sample/ios && bundle install |
| 68 | + - custom: |
| 69 | + name: Install pods (React Native sample) |
| 70 | + met?: (cd platforms/react-native/sample/ios && bundle exec pod check --ignore-dev-pods) |
| 71 | + meet: cd platforms/react-native && pnpm run pod-install |
| 72 | + |
53 | 73 | open: |
54 | 74 | "GitHub": "https://github.com/Shopify/checkout-kit" |
55 | 75 | "Issues": "https://github.com/Shopify/checkout-kit/issues" |
|
60 | 80 | android-detekt: cd platforms/android && ./gradlew detekt |
61 | 81 | android-lint: cd platforms/android && ./gradlew lintRelease |
62 | 82 | swift-lint: cd platforms/swift && ./Scripts/lint |
| 83 | + react-native-lint-swift: cd platforms/react-native && ./scripts/lint_swift |
| 84 | + react-native-lint-module: cd platforms/react-native && pnpm module lint |
| 85 | + react-native-lint-sample: cd platforms/react-native && pnpm sample lint |
63 | 86 |
|
64 | 87 | commands: |
65 | 88 | # Repo-wide |
@@ -187,3 +210,51 @@ commands: |
187 | 210 | `dev swift test <test_class_name>` - Run only the specified test class. |
188 | 211 | syntax: "[test_class_name]" |
189 | 212 | run: cd platforms/swift && ./Scripts/xcode_run test ShopifyCheckoutKit-Package "$1" |
| 213 | + |
| 214 | + # React Native |
| 215 | + react-native: |
| 216 | + desc: "React Native Checkout Kit commands" |
| 217 | + aliases: [rn] |
| 218 | + subcommands: |
| 219 | + server: |
| 220 | + desc: Start Metro development server |
| 221 | + run: cd platforms/react-native && pnpm sample start --reset-cache |
| 222 | + ios: |
| 223 | + desc: Run the iOS sample app in the simulator |
| 224 | + run: cd platforms/react-native && pnpm sample ios |
| 225 | + android: |
| 226 | + desc: Run the Android sample app in the emulator |
| 227 | + run: cd platforms/react-native && pnpm sample android |
| 228 | + clean: |
| 229 | + desc: Remove generated directories and stop sccache |
| 230 | + run: | |
| 231 | + cd platforms/react-native |
| 232 | + pnpm module clean |
| 233 | + pnpm sample clean |
| 234 | + pnpm clean |
| 235 | + if command -v sccache >/dev/null 2>&1; then |
| 236 | + sccache --stop-server 2>/dev/null || true |
| 237 | + fi |
| 238 | + echo "Cleaned root, module and sample workspaces" |
| 239 | + lint: |
| 240 | + desc: Run all React Native lint checks (Swift, module, sample) |
| 241 | + aliases: [style, check] |
| 242 | + run: | |
| 243 | + set -e |
| 244 | + cd platforms/react-native |
| 245 | + ./scripts/lint_swift |
| 246 | + pnpm module lint |
| 247 | + pnpm sample lint |
| 248 | + subcommands: |
| 249 | + swift: |
| 250 | + desc: Lint Swift code via SwiftLint |
| 251 | + run: cd platforms/react-native && ./scripts/lint_swift |
| 252 | + module: |
| 253 | + desc: Lint the @shopify/checkout-sheet-kit module |
| 254 | + run: cd platforms/react-native && pnpm module lint |
| 255 | + sample: |
| 256 | + desc: Lint the sample app |
| 257 | + run: cd platforms/react-native && pnpm sample lint |
| 258 | + fix: |
| 259 | + desc: Auto-fix Swift lint issues |
| 260 | + run: cd platforms/react-native && ./scripts/lint_swift fix |
0 commit comments