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

Get rid of module specifier for the 2nd argument of add-availability (and -a option for create-component)

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Obsolete
    • Icon: Neutral Neutral
    • None
    • None
    • Basel 88
    • 0.5

      mgnl-add-availability has the following synopsis:

      mgnl-add-availability <[refId/]componentName> <[moduleName:relPath/]page@area> [options]
      
      • The component to add can be from the current module or from any module, npm-cli will not check whether the specified component exists.
      • The page to add the component to must exist in the pages dir. of the current folder or in a pages dir of the directory specified by the -p option.

      This said, the 2nd argument how it is explained in the synopis can be simplified. And indeed:
      mgnl add-availability components/c1 pages/p1@main
      results in the same as
      mgnl add-availability components/c1 mymodule:pages/p1@main
      Since the npm-cli already works correct for both cases, we prbly. just have to adapt the Usage text.

      The same is true for the -a option when calling create-component:
      both
      mgnl create-component c3 -a pages/p1@main
      and
      mgnl create-component c3 -a my-module:pages/p1@main
      does the same.

        Acceptance criteria

              rkowalski Robert Kowalski
              cmeier Christoph Meier
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Task DoD