npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@magnolia/cli-hybrid-to-lm-plugin

v0.1.0-preview

Published

A plugin to allow the conversion of hybrid light modules to light modules

Downloads

24

Readme

HybridToLmPlugin

A plugin for Magnolia CLI to convert hybrid light modules to light modules that can be modified on the file system.

Installation

Using add-plugin

  1. Run the following command in the project's root directory:

    npm run mgnl -- add-plugin @magnolia/cli-hybrid-to-lm-plugin

    The command will install the plugin, and automatically register the plugin in mgnl.config.js file:

    import HybridToLmPlugin from "@magnolia/cli-hybrid-to-lm-plugin";
    
    export default {
      plugins: [
        new HybridToLmPlugin()
      ]
    };
  2. To confirm that the plugin has been successfully installed, run:

    npm run mgnl -- hybrid-to-lm --help

Manually

  1. Run the following command in the project's root directory:
    npm install @magnolia/cli-hybrid-to-lm-plugin
  2. Manually add HybridToLmPlugin to mgnl.config.js file:
    import HybridToLmPlugin from "@magnolia/cli-hybrid-to-lm-plugin";
    
    export default {
      plugins: [
        new HybridToLmPlugin()
      ]
    };
  3. To confirm that the plugin has been successfully installed, run:
    npm run mgnl -- hybrid-to-lm --help

Usage

Options

| Short | Long | Description | |-------------------|-------------------------------------------------|--------------------------------------------------------------------------------------------------------| | -j [name] | --jar-module [name] | Specify the JAR module to extract light modules from | | -l [names...] | --light-modules [names...] | Specify the light modules to extract from the JAR. Multiple -l options can be specified to extract multiple module | | -p [path] | --config-path [path] | Path to a JSON configuration file containing JAR modules and light modules mapping |

| -v | --version | Output the version number | | -h | --help | Display help for command |

Configurable Properties in mgnl.config.js

Global Properties

| Property | Description | |--------------------|-----------------------------------------------------------| | lightModulesPath | The directory where light modules will be created | | lightModule | The selected light module |

Plugin-Specific Properties

| Property | Description | |--------------------|-----------------------------------------------------------| | configPath | Path to a JSON configuration file containing JAR modules and light modules mapping | | jarModule | The selected JAR modules and light modules mapping (same as seen below in the HybridToLmPlugin constructor) |

The plugin can be configured through a JSON configuration file or directly in the constructor:

import HybridToLmPlugin from "@magnolia/cli-hybrid-to-lm-plugin";

export default {
  plugins: [
    new HybridToLmPlugin({
      jarModules: {
        'magnolia-password-manager-app': ['password-manager-app'],
        'magnolia-dam-app': ['dam-app-core'],
        'magnolia-graphql-core': ['graphql-core']
      },
      configPath: 'https://example.com/config.json',
      // auth: 'username:password'  // Auth is currently unsupported
    })
  ]
};

Examples

Extract a specific light module from a JAR

npm run mgnl -- hybrid-to-lm -j magnolia-dam-app -l dam-app-core

This command extracts the 'dam-app-core' module from the 'magnolia-dam-app' JAR file.

Extract multiple light modules from a JAR

npm run mgnl -- hybrid-to-lm -j magnolia-graphql-core -l graphql-core graphql-app

This command extracts both 'graphql-core' and 'graphql-app' modules from the 'magnolia-graphql-core' JAR file.

Use a remote configuration file with authentication

npm run mgnl -- hybrid-to-lm -p https://example.com/config.json

This command will load the configuration from the remote URL.

npm run mgnl -- hybrid-to-lm -p https://example.com/config.json

This command will load the configuration from the remote URL.

Use a configuration file

npm run mgnl -- hybrid-to-lm -p /path/to/my-config.json

This command uses a configuration file to extract multiple modules from multiple JARs. Example configuration file:

{
  "jarModules": {
    "magnolia-password-manager-app": ["password-manager-app"],
    "magnolia-dam-app": ["dam-app-core"],
    "magnolia-graphql-core": ["graphql-core"]
  }
}

The -p can also be a remote resource via a URL:

npm run mgnl -- hybrid-to-lm -p https://example.com/my-config.json

Handling Existing Light Modules

When a light module already exists, the plugin will prompt you to confirm if you want to overwrite it:

Light module 'password-manager-app' already exists at /path/to/light-modules/password-manager-app. Do you want to overwrite it? (y/N)

You can choose to overwrite the existing module or skip it.

Plugin Documentation

For detailed documentation of the plugin, please refer to Plugin Documentation

Magnolia CMS

This plugin is created to work with Magnolia CMS. For more information, please refer to Magnolia CMS Documentation