ignite icon indicating copy to clipboard operation
ignite copied to clipboard

revise generator to use different paths

Open mchisolm0 opened this issue 7 months ago • 7 comments

When the generator is run, it references certain paths which are different after converting to Expo Router (link).

Relevant frontmatter in the ejs file

---
patches:
- path: "app/screens/index.ts"
  append: "export * from \"./<%= props.pascalCaseName %>Screen\"\n"
  skip: <%= props.skipIndexFile %>
- path: "app/navigators/AppNavigator.tsx"
  replace: "// IGNITE_GENERATOR_ANCHOR_APP_STACK_PARAM_LIST"
  insert: "<%= props.pascalCaseName %>: undefined\n\t// IGNITE_GENERATOR_ANCHOR_APP_STACK_PARAM_LIST"
- path: "app/navigators/AppNavigator.tsx"
  replace: "{/* IGNITE_GENERATOR_ANCHOR_APP_STACK_SCREENS */}"
  insert: "<Stack.Screen name=\"<%= props.pascalCaseName %>\" component={Screens.<%= props.pascalCaseName %>Screen} />\n\t\t\t{/* IGNITE_GENERATOR_ANCHOR_APP_STACK_SCREENS */}"
  skip: <%= props.skipIndexFile %>
---

When I brought it up, modifying the generator to allow for changing the paths used was brought up.

Is that something you are wanting to consider? If so, I'm happy to help. Otherwise, we can close this issue.

mchisolm0 avatar Jul 20 '24 07:07 mchisolm0