Skip to content

Commit 30bfaed

Browse files
committed
⚙️ Chore: Update Package Scripts
1 parent 70c4fb7 commit 30bfaed

File tree

1 file changed

+25
-27
lines changed

1 file changed

+25
-27
lines changed

package.json

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -29,49 +29,47 @@
2929
"example": "yarn workspace react-native-ios-context-menu-example",
3030
"typescript": "tsc --noEmit --project tsconfig.build.json",
3131
"typescript:example": "cd example && tsc --noEmit --project tsconfig.json",
32-
"typescript:all": "yarn run typescript ; yarn run typescript-example",
32+
"typescript:all": "yarn run typescript && yarn run typescript-example",
3333
"lint": "eslint \"**/*.{js,ts,tsx}\"",
34-
"lint:circular-dep": "npx dpdm --no-warning --no-tree ./src/index.ts ; npx madge --circular --extensions ts ./src",
34+
"lint:circular-dep": "npx dpdm --no-warning --no-tree ./src/index.ts && npx madge --circular --extensions ts ./src",
3535
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
3636
"prepare": "bob build",
3737
"release": "release-it --only-version",
3838
"open:ios": "open -a \"Xcode\" example/ios",
3939
"open:android": "open -a \"Android Studio\" example/android",
40-
"open:docs": "open -a \"Typora\" .",
40+
"open:docs": "open -a \"Typora\" ./README.md",
4141
"close:ios": "killall Xcode",
42-
"reopen:ios": "yarn run close:ios ; yarn run open:ios",
43-
"build": "yarn run build:js ; yarn run build:ios",
44-
"build:js": "yarn run lint ; yarn run lint:circular-dep ; yarn run typescript ; yarn run bob build",
45-
"build:docs": "sh ./make-readme.sh",
42+
"reopen:ios": "yarn run close:ios && yarn run open:ios",
43+
"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 ../..",
44+
"build": "yarn run build:js && yarn run build:ios",
45+
"build:js": "yarn run lint && yarn run lint:circular-dep && yarn run typescript && yarn run bob build",
4646
"build:ios": "sh ./scripts/build-ios.sh",
4747
"build:ios-release": "sh ./scripts/build-ios.sh Release",
48-
"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 ../..",
49-
"build:ios-info": "cd ./example/ios ; xcodebuild -project ./*.xcodeproj -showBuildSettings -list ; xcodebuild -project ./*.xcodeproj -showBuildSettings",
48+
"build:ios-info": "cd ./example/ios && xcodebuild -project ./*.xcodeproj -showBuildSettings -list && xcodebuild -project ./*.xcodeproj -showBuildSettings",
5049
"run:release": "cd example && npx react-native run-ios --configuration Release",
5150
"run:debug": "cd example && npx react-native run-ios --configuration Debug",
5251
"build-and-run": "yarn run build && yarn run run:debug && yarn run run:release",
5352
"pod-install": "yarn run pod-install:new-static",
5453
"pod-install:old": "yarn run pod-install:old-static",
55-
"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",
56-
"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",
57-
"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",
58-
"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",
59-
"pod-install:reopen": "yarn run close:ios ; yarn run pod-install ; yarn run open:ios",
60-
"pod-install:reopen-old": "yarn run close:ios ; yarn run pod-install:old ; yarn run open:ios",
61-
"nuke:node-modules": "rm -rfv ./yarn.lock ./node_modules ; yarn run nuke:node-modules",
62-
"nuke:example": "yarn run nuke:example-node-modules ; yarn run nuke:example-pods ; yarn run nuke:example-pods-env",
63-
"nuke:example-node-modules": "cd example ; rm -rfv ./node_modules ./yarn.lock ; cd ../..",
64-
"nuke:example-pods": "cd example/ios ; pod cache clean --all ; rm -rfv ./Pods ./build ./Podfile.lock ; cd ../..",
54+
"pod-install:new-static": "cd example/ios && bundle install && RCT_NEW_ARCH_ENABLED=1 USE_FRAMEWORKS='static' bundle exec pod install && cd ../.. && yarn run build:update-version && yarn run pod-install:set-env",
55+
"pod-install:new-dynamic": "cd example/ios && bundle install && RCT_NEW_ARCH_ENABLED=1 USE_FRAMEWORKS='dynamic' bundle exec pod install && cd ../.. && yarn run build:update-version && yarn run pod-install:set-env",
56+
"pod-install:old-static": "cd example/ios && RCT_NEW_ARCH_ENABLED=0 USE_FRAMEWORKS='static' pod install && cd ../.. && yarn run build:update-version && yarn run pod-install:set-env",
57+
"pod-install:old-dynamic": "cd example/ios && RCT_NEW_ARCH_ENABLED=0 USE_FRAMEWORKS='dynamic' pod install && cd ../.. && yarn run build:update-version && yarn run pod-install:set-env",
58+
"pod-install:set-env": "yarn run nuke:example-pods-env && sh ./scripts/set-node-env.sh",
59+
"pod-install:reopen": "yarn run close:ios && yarn run pod-install && yarn run open:ios",
60+
"pod-install:reopen-old": "yarn run close:ios && yarn run pod-install:old && yarn run open:ios",
61+
"nuke:node-modules": "rm -rfv ./yarn.lock ./node_modules && cd example && rm -rfv ./node_modules ./yarn.lock && cd ../..",
62+
"nuke:example-pods": "cd example/ios && pod cache clean --all && rm -rfv ./Pods ./build ./Podfile.lock && cd ../..",
6563
"nuke:example-pods-env": "cd example/ios && rm -rfv ./.xcode.env.local ./.xcode.env",
6664
"nuke:derived-data": "rm -rfv $HOME/Library/Developer/Xcode/DerivedData",
67-
"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",
68-
"nuke:all": "yarn run nuke:example-pods ; yarn run nuke:cache-js ; yarn run nuke:derived-data ; npm run nuke:node-modules",
69-
"update-dep": "yarn add react-native-ios-utilities --dev ; cd example ; yarn add react-native-ios-utilities ; cd ..",
70-
"update-dep:next": "yarn add react-native-ios-utilities@next --dev ; cd example ; yarn add react-native-ios-utilities@next ; cd ..",
71-
"update-dep:pods": "cd example/ios ; pod install --repo-update ; pod update DGSwiftUtilities ContextMenuAuxiliaryPreview ; cd ../.. ; yarn run build:update-version",
72-
"initialize": "yarn run initialize:js ; yarn run pod-install",
73-
"initialize:js": "yarn install ; cd example ; yarn install ; cd ..",
74-
"initialize:reset": "npm run nuke:all ; yarn ; npm run initialize",
65+
"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",
66+
"nuke:all": "yarn run nuke:example-pods && yarn run nuke:cache-js && yarn run nuke:derived-data && npm run nuke:node-modules",
67+
"update-dep": "yarn add react-native-ios-utilities --dev && cd example && yarn add react-native-ios-utilities && cd ..",
68+
"update-dep:next": "yarn add react-native-ios-utilities@next --dev && cd example && yarn add react-native-ios-utilities@next && cd .. && yarn run build:update-version",
69+
"update-dep:pods": "cd example/ios ; bundle exec pod install --repo-update ; bundle exec pod update DGSwiftUtilities ContextMenuAuxiliaryPreview ; cd ../.. ; yarn run build:update-version",
70+
"initialize": "yarn run initialize:js && yarn run pod-install",
71+
"initialize:js": "yarn install && cd example && yarn install && cd ..",
72+
"initialize:reset": "npm run nuke:all && yarn && npm run initialize",
7573
"test-build:all": "sh ./scripts/test-builds.sh",
7674
"test-build:all-quick": "sh ./scripts/test-builds.sh quick"
7775
},

0 commit comments

Comments
 (0)