infinitered / ignite-andross

The original React Native boilerplate from Infinite Red - Redux, React Navigation, & more
https://infinite.red/ignite
MIT License
475 stars 151 forks source link

Flexible regex patterns #220

Open SpaghettiC0des opened 5 years ago

SpaghettiC0des commented 5 years ago

I'm using prettier in vscode to format my code, but when I try to generate a code (e.g a container), ignite cli shows a warning and it does not properly append the Screen to the AppNavigation config.

I temporarily fixed this by modifying lib/patterns.js on andross boilerplate

const constants = {
  PATTERN_IMPORTS: "imports",
  PATTERN_ROUTES: "routes"
};

module.exports = {
  constants,
  [constants.PATTERN_IMPORTS]: `import[\\s\\S]*from\\s+(?:'|")react-navigation(?:'|");?`,
  [constants.PATTERN_ROUTES]: `const PrimaryNav = StackNavigator(
    {`
};
jamonholmgren commented 5 years ago

@karlmarxlopez Mind taking a stab at a pull request to fix this?