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

Refactor initial code

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Neutral
    • 0.0.1
    • None
    • Basel 43
    • 13

    Description

      Refactor code originally contributed by Tomáš Gregovský.

      Based on the comments below and in attached concept page:

      • convert scripts to single one named mgnl (syntax will then be mgnl create-page xxx, {{mgnl create-component xxx}, etc )
      • upon install, make scripts global ( install only with -g)
      • during install, prototypes used by cli to produce template and dialog definitions are expanded in global node_modules location
      • as optional step, add mgnl setup that will copy prototypes and package.json to either current location or to one provided as parameter to the command
      • modify script to read prototypes from the location specified in MGNLCLI_HOME system property or from default (global) location if not set.

      This way internals of the cli will stay hidden by default, but can be still exposed via setup for those who need to have multiple different types of prototypes and other configuration for multiple different projects.

      If in doubt, check the concept page or consult w/ reporter.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                fgrilli Federico Grilli
                had Jan Haderka
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Task DoD

                    Time Tracking

                      Estimated:
                      Original Estimate - Not Specified
                      Not Specified
                      Remaining:
                      Remaining Estimate - 0d
                      0d
                      Logged:
                      Time Spent - 6d 3h
                      6d 3h