ignite-typescript-boilerplate
ignite-typescript-boilerplate copied to clipboard
Fails to update AppNavigation.tsx
I ran the following command to generate a new list screen, but it failed to update the AppNavigation.tsx
$> ignite generate list Groups
? What kind of List would you like to generate? Grid
? How will your data be presented on this list? Single
✔︎ App/Containers/Groups/Groups.tsx
✔︎ App/Containers/Groups/GroupsStyle.ts
vvv -----[ DEBUG ]----- vvv
Error: 'import[\s\S]*from\s+"react-navigation";?' was not found in file /Users/domi/work/ws/react/XmasGnomeTS/App/Navigation/AppNavigation.tsx.
at Object.insertInFile (/Users/domi/.config/yarn/global/node_modules/ignite-cli/src/extensions/patching.js:31:33)
at Object.patchInFile (/Users/domi/.config/yarn/global/node_modules/ignite-cli/src/extensions/ignite/patchInFile.js:44:16)
at Object.module.exports [as run] (/Users/domi/work/ws/react/XmasGnomeTS/node_modules/ignite-typescript-boilerplate/commands/list.js:120:12)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
^^^ -----[ DEBUG ]----- ^^^
AppNavigation.tsx
currently looks like this:
import {StackNavigator} from 'react-navigation';
import GroupsScreen from '../Containers/GroupsScreen/GroupsScreen';
import SettingsScreen from '../Containers/SettingsScreen/SettingsScreen';
import LaunchScreen from '../Containers/LaunchScreen';
import styles from './Styles/NavigationStyles';
// Manifest of possible screens
const PrimaryNav = StackNavigator({
GroupsScreen: {screen: GroupsScreen},
SettingsScreen: {screen: SettingsScreen},
LaunchScreen: {screen: LaunchScreen},
}, {
// Default config for all screens
headerMode: 'none',
initialRouteName: 'LaunchScreen',
navigationOptions: {
headerStyle: styles.header,
},
});
export default PrimaryNav;