Uploaded image for project: 'Magnolia CLI'
  1. Magnolia CLI
  2. NPMCLI-27

Own config file for mgnl-cli instead of package.json and rename _prototypes dir

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 0.0.1
    • None
    • None
    • Basel 54
    • 5

      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".
      When "mgnl setup" is run, this file should be copied to current directory, but package.json should not be copied.

      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

      • When having a local mgnl-cli configuration in your project, It is incorrect to use package.json because in this context it is not an npm module. Also, it's simply confusing to have an additional package.json, especially if you are working on an npm module, which should be a common practice with light development.
      • The contents of the package.json get alphabetically re-ordered and additional meta information is added via npm processes which make the file hard to work with, plus it stores a lot of irrelevant information.
      • Much of the package.json info (dependencies, devDependencies) is irrelevant in this context -and therefore confusing.
      • Based on analysis of javascript cli's - having a dedicated config file for the CLI is standard practice.

        Acceptance criteria

              fgrilli Federico Grilli
              czimmermann Christopher Zimmermann
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0d
                    0d
                    Logged:
                    Time Spent - 1d 5h
                    1d 5h