mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add buck rule to generate Java library
Summary: Adds buck rule for generated code Reviewed By: mdvacca, makovkastar Differential Revision: D16338763 fbshipit-source-id: 6b238b3993cc110f009ad541cfa924d0d06d2fcb
This commit is contained in:
committed by
Facebook Github Bot
parent
9a546f5e9e
commit
1783780a92
@@ -16,14 +16,14 @@ function upperCaseFirst(inString: string): string {
|
||||
return inString[0].toUpperCase() + inString.slice(1);
|
||||
}
|
||||
|
||||
export function toSafeJavaString(input: string): string {
|
||||
function toSafeJavaString(input: string): string {
|
||||
return input
|
||||
.split('-')
|
||||
.map(upperCaseFirst)
|
||||
.join('');
|
||||
}
|
||||
|
||||
export function getImports(component: ComponentShape): Set<string> {
|
||||
function getImports(component: ComponentShape): Set<string> {
|
||||
const imports: Set<string> = new Set();
|
||||
|
||||
component.extendsProps.forEach(extendProps => {
|
||||
@@ -75,3 +75,8 @@ export function getImports(component: ComponentShape): Set<string> {
|
||||
|
||||
return imports;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
toSafeJavaString,
|
||||
getImports,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user