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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@magnolia-services/my-light-module

v1.0.2

Published

Create and share Magnolia light modules.

Downloads

6

Readme

@magnolia-services/my-light-module

Create and share Magnolia light modules.

Quick Overview

Start

npx mgnl install @magnolia-services/my-light-module --path .

It will create a directory called my-light-module inside the current folder. Inside that directory, it will generate the initial project structure:

my-light-module
├── apps
├── contentTypes
├── decorations
├── dialogs
│   ├── components
│   └── pages
├── i18n
├── includes
├── restEndpoints
├── templates
│   ├── components
│   └── pages
├── virtualUriMappings
├── webresources
├── .gitignore
├── LICENSE
├── package.json
└── README.md

No configuration or complicated folder structures, only the files you need to build your light module.

Folders Descriptions

apps

A Content app is a specialized app type for managing structured content. The content app user interface consists of a browser subapp and one or more detail subapps.
Please, see Automatically generated apps.

contentTypes

Allows defining Magnolia content types in a single YAML file of a light module.
Please, see Content type definition.

decorations

Definition decoration is a mechanism which allows you to change existing configured items such as apps, dialogs, field types and templates.
Please, see Definition decoration.

dialogs

A dialog is a pop-up featuring some content and actions to conduct some operations on that content. Please, see Dialog definition.

i18n

Please, see documentation page.

includes

As a best practice, place YAML files here that do not represent full definitions, but are included by the definition files. This prevents the problem where Magnolia tries to interpret an include file as a definition and ends up reporting that the file has problems.

restEndpoints

You can define multiple delivery endpoint.
Please, see Delivery API Configuration.

templates

A template definition gives a template a name and makes it available to the system. Please, see Template definition.

virtualUriMappings

Virtual URI mapping is a way to redirect an incoming request to the actual location of the content.
Please, see Virtual URI mapping.

webresources

Folder with scripts, stylesheet or other resource files. Please, see Web resources.

Modify

Modify the folder name to match your light module.
Modify the package.json file to match your light module.
Create all files for your light module.

Publish to npm

npm publish

Magnolia provides a set of guidelines to make sure that light modules are easy to find and use by the community, but still ensure that the creator has total flexibility in how their light module is built.

| Guideline | Details | | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Findable | Include the magnolia-light-module keyword in the npm package.json file to make it easy for people to discover your module. | | Ready-to-use | Publish your light module to npm in a ready-to-use state. A developer should be able to take the package from npm, drop it in their magnolia.resources.dir (or light-modules directory), and then configure availability and how to include the web resources. | | README | Provide a complete README.md file to help people understand and use your module. |

License

@magnolia-services/my-light-module is open source software licensed as MIT.