From e0866cc983fedba492ab6337148d4ed0783bc4cb Mon Sep 17 00:00:00 2001 From: Dominic Go Date: Mon, 9 Dec 2024 04:47:51 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9A=99=EF=B8=8F=20Chore:=20Update=20Package?= =?UTF-8?q?=20Scripts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index d184e6d..cf5baa1 100644 --- a/package.json +++ b/package.json @@ -36,32 +36,38 @@ "prepare": "bob build", "release": "release-it --only-version", "open:ios": "open -a \"Xcode\" example/ios", - "open:docs": "open -a \"Typora\" ./README.md", "open:android": "open -a \"Android Studio\" example/android", + "open:docs": "open -a \"Typora\" ./README.md", "close:ios": "killall Xcode", "reopen:ios": "yarn run close:ios ; yarn run open:ios", - "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 ../..", - "build": "yarn run build:js ; yarn run build:ios ; yarn run build:docs", + "build": "yarn run build:js ; yarn run build:ios", "build:js": "yarn run lint ; yarn run lint:circular-dep ; yarn run typescript ; yarn run bob build", - "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'", + "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' clean build", + "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 ../..", "build:ios-info": "cd ./example/ios ; xcodebuild -project ./*.xcodeproj -showBuildSettings -list ; xcodebuild -project ./*.xcodeproj -showBuildSettings", "run:release": "cd example && npx react-native run-ios --configuration Release", "run:debug": "cd example && npx react-native run-ios --configuration Debug", "build-and-run": "yarn run build && yarn run run:debug && yarn run run:release", - "pod-install": "cd example/ios && bundle install ; RCT_NEW_ARCH_ENABLED=1 bundle exec pod install ; cd ../.. ; yarn run nuke:example-pods-env ; yarn run build:update-version", - "pod-install:old": "cd example/ios && RCT_NEW_ARCH_ENABLED=0 pod install ; cd ../.. ; yarn run nuke:example-pods-env ; yarn run build:update-version", + "pod-install": "yarn run pod-install:new-static", + "pod-install:old": "yarn run pod-install:old-static", + "pod-install:new-static": "cd example/ios && bundle install ; RCT_NEW_ARCH_ENABLED=1 USE_FRAMEWORKS='static' bundle exec pod install ; cd ../.. ; yarn run nuke:example-pods-env ; yarn run build:update-version", + "pod-install:new-dynamic": "cd example/ios && bundle install ; RCT_NEW_ARCH_ENABLED=1 USE_FRAMEWORKS='dynamic' bundle exec pod install ; cd ../.. ; yarn run nuke:example-pods-env ; yarn run build:update-version", + "pod-install:old-static": "cd example/ios && RCT_NEW_ARCH_ENABLED=0 USE_FRAMEWORKS='static' pod install ; cd ../.. ; yarn run nuke:example-pods-env ; yarn run build:update-version", + "pod-install:old-dynamic": "cd example/ios && RCT_NEW_ARCH_ENABLED=0 USE_FRAMEWORKS='dynamic' pod install ; cd ../.. ; yarn run nuke:example-pods-env ; yarn run build:update-version", "pod-install:reopen": "yarn run close:ios ; yarn run pod-install ; yarn run open:ios", "pod-install:reopen-old": "yarn run close:ios ; yarn run pod-install:old ; yarn run open:ios", - "nuke:node-modules": "rm -rfv ./yarn.lock ./node_modules ; cd example ; rm -rfv ./node_modules ; cd ../..", + "nuke:node-modules": "rm -rfv ./yarn.lock ./node_modules ; cd example ; rm -rfv ./node_modules ./yarn.lock ; cd ../..", "nuke:example-pods": "cd example/ios ; pod cache clean --all ; rm -rfv ./Pods ./build ./Podfile.lock ; cd ../..", "nuke:example-pods-env": "cd example/ios && rm -rfv ./.xcode.env.local ./.xcode.env", - "nuke:all": "yarn run nuke:node-modules ; yarn run nuke:example-pods ; yarn run nuke:example-pods-env", + "nuke:derived-data": "rm -rfv $HOME/Library/Developer/Xcode/DerivedData", + "nuke:cache-js": "watchman watch-del-all ; rm -rfv $TMPDIR/react-* ; rm -rfv $TMPDIR/react-native-packager-cache-* ; rm -rfv $TMPDIR/metro-bundler-cache-* ; rm -rfv $TMPDIR/haste-map-* ; rm -rfv rm -rf $TMPDIR/metro-cache ; npm cache clean --force ; npm cache verify ; yarn cache clean ; rm -rfv ~/.yarn/berry/cache", + "nuke:all": "yarn run nuke:example-pods ; yarn run nuke:cache-js ; yarn run nuke:derived-data ; npm run nuke:node-modules", "update-dep": "yarn add react-native-ios-utilities --dev ; cd example ; yarn add react-native-ios-utilities ; cd .. ; yarn run update-dep:pods", "update-dep-next": "yarn add react-native-ios-utilities@next --dev ; cd example ; yarn add react-native-ios-utilities@next ; cd .. ; yarn run update-dep:pods", "update-dep:pods": "cd example/ios ; pod install --repo-update ; pod update DGSwiftUtilities ; cd ../.. ; yarn run build:update-version", - "initialize": "yarn initialize:js ; yarn run pod-install", + "initialize": "yarn run initialize:js ; yarn run pod-install", "initialize:js": "yarn install ; cd example ; yarn install ; cd ..", - "initialize:reset": "yarn run nuke:all && yarn run initialize" + "initialize:reset": "npm run nuke:all ; yarn ; npm run initialize" }, "keywords": [ "react-native",