[NPMCLI-126] auto-detect light-modules folder for create-* commands Created: 27/Mar/17 Updated: 24/Mar/22 |
|
| Status: | Open |
| Project: | Magnolia CLI |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Robert Kowalski | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | to-specify | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Date of First Response: |
| Description |
|
mmichel provided some good feedback on the CLI. after jumpstart users should just be able to use the create-* commands, e.g. create-page, without the need to specifiy a path or cd into the directory. that makes getting started a lot easier for beginners who just jumpstarted their first magnolia and don't know much about the internals (light-module folders and symlinks etc) after creation of e.g. a light-module we could additionally print: Your light-module was created. To modify it, open /Users/robert/magnolia/light-modules/foobar in a text-editor |
| Comments |
| Comment by Robert Kowalski [ 27/Mar/17 ] |
|
czimmermann what do you think? |
| Comment by Christopher Zimmermann [ 27/Mar/17 ] |
| Comment by Christopher Zimmermann [ 04/Apr/17 ] |
|
But can either of you think of how this could work for create-page and create-component? They would still need to go to the specific light module for them to work. Should the command be interactive and offer to "take them there"? Or the message should probably be about going to that path and then running create-page or create-component, rather than about opening a text editor. mmichel rkowalski How about: Light module created at /Users/robert/magnolia/light-modules/space-time. You can use the 'create-component' or 'create-page' commands in the 'space-time' directory. > Go to 'space-time' directory? (y/n) |
| Comment by Maxime Michel [ 05/Apr/17 ] |
|
I think asking the user if he wants to cd is a good pattern, better than automagically create light modules and components (which we could do in the case there is only one LM) in the right location. It's more transparent and helps the beginner learn his way around. |