Skip to content
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

cli command for generating mutation similiar to cell #582

Open
guledali opened this issue May 22, 2020 · 2 comments
Open

cli command for generating mutation similiar to cell #582

guledali opened this issue May 22, 2020 · 2 comments

Comments

@guledali
Copy link
Contributor

guledali commented May 22, 2020

yarn rw g mutation [edit|delete|new] <name>

It generates a skeleton of component with some form inputs and submit button for adding, updating or deleting something look for the existing scaffold as an inspiration,

https://github.com/redwoodjs/redwood/tree/master/packages/cli/src/commands/generate/scaffold/templates/components

@cannikin
Copy link
Member

Could you give some more info about what you see this creating? Maybe a screenshot even?

You said it should include "some form inputs and submit button for adding, updating or deleting something" but isn't that what the scaffolds already do? Or is this is just for a single Cell?

We do have a cell generator, could this be an additional flag you send to that generator that will include something more in the body of the component?

@guledali
Copy link
Contributor Author

guledali commented May 22, 2020

Just generating a single cell for mutation as sample code, not really scaffold let say you only need to add/create contact.

Scaffold gives you an entire crud + styling, something less than that. Much similar to the cell
concept.

Should be a simple generator for cases like this yarn rw g mutation new contact It gives you the bare bones structure for creating a mutation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

4 participants