Codegen: convert spec name to camel case

Summary:
Replace dashes and underscores, use camel case for spec name.

Changelog:
[Internal]

Reviewed By: RSNara

Differential Revision: D30882610

fbshipit-source-id: b66a626296cb709f04c740eae714e89be13abf2c
This commit is contained in:
Héctor Ramos 2021-09-16 14:09:22 -07:00 коммит произвёл Facebook GitHub Bot
Родитель 3024ec7ce6
Коммит fa768df2a3
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -915,7 +915,7 @@ SPEC CHECKSUMS:
React-RCTVibration: 1a58f6ab1ae5fad004119979b676cb5e912f2e44
React-runtimeexecutor: 4b0c6eb341c7d3ceb5e2385cb0fdb9bf701024f3
ReactCommon: 632474905edd9a20ec4f4084142ff4b4a4f3fd8b
ScreenshotManager: ba35548b279a0ec9ea99b25f4e8cbb26164d2ac4
ScreenshotManager: c5c6453f0227490e8610f405c79ecfe39b0114e4
Yoga: c0d06f5380d34e939f55420669a60fe08b79bd75
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

Просмотреть файл

@ -160,7 +160,7 @@ def use_react_native_codegen!(spec, options={})
prefix = options[:react_native_path] ||= "../.."
# Library name (e.g. FBReactNativeSpec)
library_name = options[:library_name] ||= "#{spec.name}Spec"
library_name = options[:library_name] ||= "#{spec.name.gsub('_','-').split('-').collect(&:capitalize).join}Spec"
# Output dir, relative to podspec that invoked this method
output_dir = options[:output_dir] ||= "#{library_name}"