-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create generator for routes #6
Comments
Am really thinking something on this lines https://github.com/yeoman/generator-angular#route. So that when you generate a a routes you pretty much get a ready to go crud ui and all you need to is define the actually data model or even be more railsy and do something like |
I've been thinking about this too. Specifically about storing a components name and path in a routes manifest whenever a route is generated. If that route is a child route you could use babel-core to parse the parent's route file, inject the route into the getChildRoutes function (or add it if its not present), and then write the transformed code back to the file. When uninstall becomes a thing you could use the same process to remove the route. This way you'd get automatic route upkeep without being too prescriptive about what a route file should look like. |
That sounds like a great approach! Would you have any interest in working on a PR for it? It would also be important to design the blueprint with a specific version of the react-redux-starter kit in mind. |
Continuing discussion at #115 |
Curious as to how I could inject a route into a pre-built routes.js file.
Maybe there could be a routes manifest and the routes.js gets built dynamically from the routes manifest. That way it's easy to add lines to the generated routes manifest and have the app always reflect the right routes. Kind of like how Rails has a routes config.
Route generator should also probably create the appropriate View container file for that route by appending RouteName + View.
The text was updated successfully, but these errors were encountered: