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

Add "light-module"-placeholder to component/page mgnl-cli-prototypes


    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.1.0
    • 1.0.7
    • None
    • Basel 86
    • 2

      Currently create-component and create-page copy the (optionally customized) prototype and replace the containing "__name__" placeholder with the passed name argument. When using customized mgnl-cli-prototypes, a placeholder for the name of the corresponding light module could be useful as well. E.g. for having light-module-relative import paths or adding prefixes/suffixes with the name of the light-module.

      The logic for this should currently be in "@magnolia/cli/lib/createComponent.js#65", where only the "_name" placeholder is passed to the _createFromPrototype.create() function.

      edit: To avoid ambiguity, it might be a good idea to rename "mgn-cli-prototypes" to "blueprints". I just realized this, when writing this ticket, as "prototype" in magnolia now has two different meanings.

        Acceptance criteria

              rkowalski Robert Kowalski
              mmueller Matthias Müller
              1 Vote for this issue
              4 Start watching this issue