Skip to content

Instantly share code, notes, and snippets.

@TheSavior
Created February 25, 2020 21:08
Show Gist options
  • Save TheSavior/c1d9dcc87a4ed37923eaa971f059a21b to your computer and use it in GitHub Desktop.
Save TheSavior/c1d9dcc87a4ed37923eaa971f059a21b to your computer and use it in GitHub Desktop.
Possible Codegen configuration
const Codegen = require('react-native-codegen');
const FlowParser = require('react-native-codegen-flow-parser');
const FabricObjcGenerator = require('react-native-codegen-fabric-objc-generator');
const ViewConfigGenerator = require('react-native-codegen-viewconfig-generator');
const MarkdownDocumentationGenerator = require('react-native-codegen-markdown-generator');
Codegen({
schema: new FlowParser({
files: ["src/*NativeComponent.js", "src/*NativeModule.js"],
otherConfig: true
}),
generators: [
new FabricObjcGenerator({
bridgeTypes: {
ColorPrimitive: {
header: ...,
kind: ...,
nativeTypeName: ...,
}
},
destFolder: "",
}),
new ViewConfigGenerator({
destFolder: "",
}),
new MarkdownDocumentationGenerator({
destFolder: "",
})
]
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment