Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Magnolia CLI

Introduction

An npm package providing a CLI tool to setup and facilitate Light Development with Magnolia.

Installs the mgnl command which allows performing several key operations for Light Development

Enables creating modules, pages, and components without any special IDE or Java requirements

Advantages of Magnolia CLI

Light modules, page, area, and component templates are created automatically

No need to restart the server

Creating a Light Module

mgnl create-light-module onepager-light-module

exercise-cli-light-module-1.png

Folders in the Light Module

All these folders are intended for a specific use:

$magnolia.resources.dir

  • The folder the 'magnolia.resources.dir' value points to.
  • It is defined in: /webapps/%WEBAPP-NAME%/WEB-INF/config/default/

<module-name>

  • The root folder of the module
  • The folder name is the name of the module

decorations

  • Enables decorating of configurations and definitions

dialogs

  • Where the dialog definitions (YAML files) are saved
  • Using Magnolia CLI tool, it creates the sub-folders 'components' and 'pages'

i18n

  • Way to adapt Magnolia to different languages and regional differences

templates

  • Folder for all the template definitions (YAML files) and template scripts (FTL files)
  • Using Magnolia CLI tool, it creates the sub-folders 'components' and 'pages'

resources

  • All the resources
  • Typically contains sub-folders; it could also be multiple folders
  • Using Magnolia CLI tool, it is named 'webresources'
  • While you are free to choose a folder name for the resources, we recommend you to use 'webresources' as is

   

   


  • No labels