Stop copying unused JS files into the Pods folder
Summary: Currently the podspec copies JS files along with the associated Obj-C files (ex: PushNotifications.m and PushNotifications.js are copied together). However the packager looks at `node_modules`, not `Pods`, for the JS source files so these copied JS source files (plus JS unit tests) were always ignored and are cruft. This is documented as a breaking change but I suspect it won't affect most (if any) configurations. For this to have been useful, you would have had to have had been running the packager under `Pods/..some path to RN../cli.js` instead of with `npm start` or `node_modules/react-native/cli.js`. Closes https://github.com/facebook/react-native/pull/11761 Differential Revision: D4404934 fbshipit-source-id: a9f372a74f7acb962581f929647e82eae185c5ba
This commit is contained in:
parent
ad0493c6c2
commit
0d78bba7fe
|
@ -28,7 +28,7 @@ Pod::Spec.new do |s|
|
||||||
s.platform = :ios, "8.0"
|
s.platform = :ios, "8.0"
|
||||||
s.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => "c++14" }
|
s.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => "c++14" }
|
||||||
s.header_dir = 'React'
|
s.header_dir = 'React'
|
||||||
s.preserve_paths = "cli.js", "Libraries/**/*.js", "lint", "linter.js", "node_modules", "package.json", "packager", "PATENTS", "react-native-cli"
|
s.preserve_paths = "package.json", "LICENSE", "LICENSE-CustomComponents", "PATENTS"
|
||||||
|
|
||||||
s.subspec 'Core' do |ss|
|
s.subspec 'Core' do |ss|
|
||||||
ss.dependency 'React/yoga'
|
ss.dependency 'React/yoga'
|
||||||
|
@ -63,19 +63,16 @@ Pod::Spec.new do |s|
|
||||||
s.subspec 'ART' do |ss|
|
s.subspec 'ART' do |ss|
|
||||||
ss.dependency 'React/Core'
|
ss.dependency 'React/Core'
|
||||||
ss.source_files = "Libraries/ART/**/*.{h,m}"
|
ss.source_files = "Libraries/ART/**/*.{h,m}"
|
||||||
ss.preserve_paths = "Libraries/ART/**/*.js"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
s.subspec 'RCTActionSheet' do |ss|
|
s.subspec 'RCTActionSheet' do |ss|
|
||||||
ss.dependency 'React/Core'
|
ss.dependency 'React/Core'
|
||||||
ss.source_files = "Libraries/ActionSheetIOS/*.{h,m}"
|
ss.source_files = "Libraries/ActionSheetIOS/*.{h,m}"
|
||||||
ss.preserve_paths = "Libraries/ActionSheetIOS/*.js"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
s.subspec 'RCTAdSupport' do |ss|
|
s.subspec 'RCTAdSupport' do |ss|
|
||||||
ss.dependency 'React/Core'
|
ss.dependency 'React/Core'
|
||||||
ss.source_files = "Libraries/AdSupport/*.{h,m}"
|
ss.source_files = "Libraries/AdSupport/*.{h,m}"
|
||||||
ss.preserve_paths = "Libraries/AdSupport/*.js"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
s.subspec 'RCTAnimation' do |ss|
|
s.subspec 'RCTAnimation' do |ss|
|
||||||
|
@ -87,56 +84,47 @@ Pod::Spec.new do |s|
|
||||||
ss.dependency 'React/Core'
|
ss.dependency 'React/Core'
|
||||||
ss.dependency 'React/RCTImage'
|
ss.dependency 'React/RCTImage'
|
||||||
ss.source_files = "Libraries/CameraRoll/*.{h,m}"
|
ss.source_files = "Libraries/CameraRoll/*.{h,m}"
|
||||||
ss.preserve_paths = "Libraries/CameraRoll/*.js"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
s.subspec 'RCTGeolocation' do |ss|
|
s.subspec 'RCTGeolocation' do |ss|
|
||||||
ss.dependency 'React/Core'
|
ss.dependency 'React/Core'
|
||||||
ss.source_files = "Libraries/Geolocation/*.{h,m}"
|
ss.source_files = "Libraries/Geolocation/*.{h,m}"
|
||||||
ss.preserve_paths = "Libraries/Geolocation/*.js"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
s.subspec 'RCTImage' do |ss|
|
s.subspec 'RCTImage' do |ss|
|
||||||
ss.dependency 'React/Core'
|
ss.dependency 'React/Core'
|
||||||
ss.dependency 'React/RCTNetwork'
|
ss.dependency 'React/RCTNetwork'
|
||||||
ss.source_files = "Libraries/Image/*.{h,m}"
|
ss.source_files = "Libraries/Image/*.{h,m}"
|
||||||
ss.preserve_paths = "Libraries/Image/*.js"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
s.subspec 'RCTNetwork' do |ss|
|
s.subspec 'RCTNetwork' do |ss|
|
||||||
ss.dependency 'React/Core'
|
ss.dependency 'React/Core'
|
||||||
ss.source_files = "Libraries/Network/*.{h,m,mm}"
|
ss.source_files = "Libraries/Network/*.{h,m,mm}"
|
||||||
ss.preserve_paths = "Libraries/Network/*.js"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
s.subspec 'RCTPushNotification' do |ss|
|
s.subspec 'RCTPushNotification' do |ss|
|
||||||
ss.dependency 'React/Core'
|
ss.dependency 'React/Core'
|
||||||
ss.source_files = "Libraries/PushNotificationIOS/*.{h,m}"
|
ss.source_files = "Libraries/PushNotificationIOS/*.{h,m}"
|
||||||
ss.preserve_paths = "Libraries/PushNotificationIOS/*.js"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
s.subspec 'RCTSettings' do |ss|
|
s.subspec 'RCTSettings' do |ss|
|
||||||
ss.dependency 'React/Core'
|
ss.dependency 'React/Core'
|
||||||
ss.source_files = "Libraries/Settings/*.{h,m}"
|
ss.source_files = "Libraries/Settings/*.{h,m}"
|
||||||
ss.preserve_paths = "Libraries/Settings/*.js"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
s.subspec 'RCTText' do |ss|
|
s.subspec 'RCTText' do |ss|
|
||||||
ss.dependency 'React/Core'
|
ss.dependency 'React/Core'
|
||||||
ss.source_files = "Libraries/Text/*.{h,m}"
|
ss.source_files = "Libraries/Text/*.{h,m}"
|
||||||
ss.preserve_paths = "Libraries/Text/*.js"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
s.subspec 'RCTVibration' do |ss|
|
s.subspec 'RCTVibration' do |ss|
|
||||||
ss.dependency 'React/Core'
|
ss.dependency 'React/Core'
|
||||||
ss.source_files = "Libraries/Vibration/*.{h,m}"
|
ss.source_files = "Libraries/Vibration/*.{h,m}"
|
||||||
ss.preserve_paths = "Libraries/Vibration/*.js"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
s.subspec 'RCTWebSocket' do |ss|
|
s.subspec 'RCTWebSocket' do |ss|
|
||||||
ss.dependency 'React/Core'
|
ss.dependency 'React/Core'
|
||||||
ss.source_files = "Libraries/WebSocket/*.{h,m}"
|
ss.source_files = "Libraries/WebSocket/*.{h,m}"
|
||||||
ss.preserve_paths = "Libraries/WebSocket/*.js"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
s.subspec 'RCTLinkingIOS' do |ss|
|
s.subspec 'RCTLinkingIOS' do |ss|
|
||||||
|
@ -147,7 +135,6 @@ Pod::Spec.new do |s|
|
||||||
s.subspec 'RCTTest' do |ss|
|
s.subspec 'RCTTest' do |ss|
|
||||||
ss.dependency 'React/Core'
|
ss.dependency 'React/Core'
|
||||||
ss.source_files = "Libraries/RCTTest/**/*.{h,m}"
|
ss.source_files = "Libraries/RCTTest/**/*.{h,m}"
|
||||||
ss.preserve_paths = "Libraries/RCTTest/**/*.js"
|
|
||||||
ss.frameworks = "XCTest"
|
ss.frameworks = "XCTest"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue