[NPMCLI-27] Own config file for mgnl-cli instead of package.json and rename _prototypes dir Created: 14/Jul/16 Updated: 22/Aug/16 Resolved: 27/Jul/16 |
|
| Status: | Closed |
| Project: | Magnolia CLI |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 0.0.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Christopher Zimmermann | Assignee: | Federico Grilli |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 1d 5h | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| 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)
|
||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||
| Date of First Response: | |||||||||
| Sprint: | Basel 54 | ||||||||
| Story Points: | 5 | ||||||||
| Description |
|
There are problems with using the package.json file to store the configuration for the CLI, now that it is installed globally, and new "instances" of configuration can be created with "mgnl setup". Configuration nodes specific to the mgnl cli (setupMagnolia, config, lightModuleName, lightDevFoldersInModule, lightDevCopyResources) should be removed from the master package.json and stored in a new file "mgnl-cli.json". The _prototypes directory should also be renamed to "mgnl-cli-prototypes" because the name is not specific enough and will be confusing when copied into project directories with "mgnl setup". Reasons
|
| Comments |
| Comment by Tomáš Gregovský [ 19/Jul/16 ] |
|
I agree that with a loot of added meta properties and alphabetical reordering it is not that clear how it was in first development versions. But I still would prefer to have configuration in one file, because stuff like dependencies to another npm packages for front end resources (e.g. jquery) are saved in package.json There is also LM descriptor file, since we have it, I can see the way where these cli config from package.json can be moved to this one. But I am not fan of additing another one (third) configuration file. |
| Comment by Christopher Zimmermann [ 19/Jul/16 ] |
|
Thanks for the comment. I appreciate not wanting to have too many config files, but I think in this case it is preferable not to combine the cli config file with LM descriptor. My main reasoning is that the CLI is not a light module. Some issues.
|
| Comment by Tomáš Gregovský [ 19/Jul/16 ] |
|
Just some bits:
Maybe we should put down all possible scenarios what we want to have doable with CLI and then in scope of all of them bring some nice, easy solution (maybe multiple files if its really will be the best solution). but I am not fan of 'now we need to cover this, lets add new config file' (no offense |
| Comment by Christopher Zimmermann [ 19/Jul/16 ] |
|
I think the package.json made total sense as a starting point - and makes much more sense if you install the thing locally. The real problems are introduced because of the global installation. |
| Comment by Christopher Zimmermann [ 20/Jul/16 ] |
|
Since the "_prototypes" directory will be copied to new (arbitrary) locations, it should be named so that it is clear what it is used for - for example "mgnl-cli-prototypes". |
| Comment by Christoph Meier [ 27/Jul/16 ] |
|
Mixing up global and local configuration is not possible. Once you have made a local setup, this setup must be "complete". And with this said - |