Skip to content

Commit 949005d

Browse files
committed
⚙️ Chore: Add Package Scripts
1 parent fa4412d commit 949005d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,23 @@
4545
"prepare": "bob build",
4646
"release": "release-it --only-version",
4747
"open:ios": "open -a \"Xcode\" example/ios",
48+
"open:docs": "open -a \"Typora\" ./docs/README-01-Pre.md",
4849
"open:android": "open -a \"Android Studio\" example/android",
50+
"close:ios": "killall Xcode",
51+
"reopen:ios": "yarn run close:ios ; yarn run open:ios",
4952
"build:update-version": "PACKAGE_VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | sed 's/-.*//') ; cd example/ios ; agvtool new-marketing-version $PACKAGE_VERSION ; xcrun agvtool next-version -all ; cd ../..",
50-
"build": "yarn run build:js ; yarn run build:ios",
53+
"build": "yarn run build:js ; yarn run build:ios ; yarn run build:docs",
5154
"build:js": "yarn run lint ; yarn run typescript ; yarn run bob build",
5255
"build:ios": "cd ./example/ios ; BUILD_INFO=$(xcodebuild -project ./*.xcodeproj -showBuildSettings -list -json | tr -d ' ' | tr -d '\n') ; SCHEME_NAME=$(node -pe 'JSON.parse(process.argv[1]).project.schemes[0]' $BUILD_INFO) ; xcodebuild -workspace *.xcworkspace -scheme $SCHEME_NAME -destination 'generic/platform=iOS'",
5356
"build:ios-info": "cd ./example/ios ; xcodebuild -project ./*.xcodeproj -showBuildSettings -list ; xcodebuild -project ./*.xcodeproj -showBuildSettings",
57+
"build:docs": "sh ./make-readme.sh",
5458
"run:release": "cd example && npx react-native run-ios --configuration Release",
5559
"run:debug": "cd example && npx react-native run-ios --configuration Debug",
5660
"build-and-run": "yarn run build && yarn run run:debug && yarn run run:release",
57-
"pod-install": "cd example/ios && bundle install ; RCT_NEW_ARCH_ENABLED=1 bundle exec pod install ; rm -rfv ./.xcode.env.local ; cd ../.. ; yarn run build:update-version",
61+
"pod-install": "yarn run close:ios ; cd example/ios && bundle install ; RCT_NEW_ARCH_ENABLED=1 bundle exec pod install ; rm -rfv ./.xcode.env.local ; cd ../.. ; yarn run build:update-version",
5862
"pod-install:old": "cd example/ios && RCT_NEW_ARCH_ENABLED=0 pod install ; rm -rfv ./.xcode.env.local ; cd ../.. ; yarn run build:update-version",
63+
"pod-install:reopen": "yarn run close:ios ; yarn run pod-install ; yarn run open:ios",
64+
"pod-install:reopen-old": "yarn run close:ios ; yarn run pod-install:old ; yarn run open:ios",
5965
"nuke:node-modules": "rm -rfv ./yarn.lock ./node_modules ; cd example ; rm -rfv ./node_modules ; cd ../..",
6066
"nuke:example-pods": "cd example/ios ; pod cache clean --all ; rm -rfv ./Pods ./build ./Podfile.lock ; cd ../..",
6167
"nuke:all": "yarn run nuke:node-modules ; yarn run nuke:example-pods",

0 commit comments

Comments
 (0)