Open fakenickels opened 6 years ago
module.exports.where = ({ name }) => `re/scenes/${name}.re` module.exports.args = { name: 'Scene name' } module.exports.gen = ({ name }, { commonTags: { stripIndent } }) => stripIndent`open Rebolt; open NavigationConfig; let component = ReasonReact.statelessComponent("${name}"); let make = (~navigation, _children) => { ...component, render: _self => <StackNavigator.Screen headerTitle="${name}" navigation> ...(() => <View> <Text> ("${name}" |> ReasonReact.string) </Text> </View>) </StackNavigator.Screen>, };` module.exports.postBuild = ({name}, { gen: { trigger } }) => { console.log( '✅ ', chalk.green( `Generated ${name} scene, gonna generate`, ), ) trigger(something here to trigger other) }