[NPMCLI-97] Copy command Created: 09/Feb/17 Updated: 24/Mar/22 |
|
| Status: | Open |
| Project: | Magnolia CLI |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Neutral |
| Reporter: | Christopher Zimmermann | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | to-specify | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Template: |
|
| Acceptance criteria: |
Empty
|
| Date of First Response: |
| Description |
|
Command to copy entities. Features:
This would be a helpful timesaver. To specify:
2 ideas
|
| Comments |
| Comment by Christopher Zimmermann [ 09/Mar/17 ] |
|
tgregovsky robertkowalski Can you add thoughts about name of command? That would be consistant with the create commands. But then create and copy are different patterns. (I think thats also more in line with other cli's like embers and angulars with "generate") Your thoughts? |
| Comment by Robert Kowalski [ 09/Mar/17 ] |
|
I believe the main reason to copy a light-module is to modify the included component. maybe frontools can confirm that? I like the idea regarding "mgnl create <something>". it feels a lot more natural to type and think of the commands. +1 to go with this pattern from me. a possible migration strategy could be to have the old "create-" commands still available, but not advertising them. |
| Comment by Cédric Eberhardt [ 16/Mar/17 ] |
|
Hi, I am also the one that prefer "mgnl add light-module", "mgnl clone light-module", "mgn remove light-module", etc... And you can support more than one command, like copy=clone=duplicate or create=add=new=init=generate for instance. Moreover this the way git, heroku, apt and others... work, so we are used to them. "mgnl clone light-module slideshow slideshow2" Or even more complicated you can let mgnl cli interact with light module's internal cli |
| Comment by Christopher Zimmermann [ 17/Mar/17 ] |
|
On the other hand, do I need to specify type? Can I just specify the name? mgnl copy the-light-module newname |
| Comment by Cédric Eberhardt [ 17/Mar/17 ] |
|
If you can recognise what it is, yes, for sure. The less verbose, the better. |
| Comment by Robert Kowalski [ 21/Mar/17 ] |
|
i like where this is going! often a light-module has the same name as a component it contains. explicitly stating what we are going to work with solves the problem at its root and additionally we don't have to implement fancy sniffing logic to find out which element we are referring to. i would go for explicit mentionign the type we are going to work with, with auto-complete to make it easier to type |