Finding and sharing light modules
Sharing light modules
The more the Magnolia community shares modules, the more productive all Magnolia developers become. Sharing a module as open source means the community can report problems that they discover, and even improve the module with bug fixes, new features, or translations. Light modules (as simple directories of files) provide a mechanism to package and share CMS functionality.
If you have some functionality that you think would be useful, like a component, consider sharing it with your fellow Magnolia developers. We all benefit when the Magnolia developer experience improves, the community becomes more active, and when Magnolia gets more visibility in the CMS and front-end development spaces.
npm
Light modules can be shared with the Magnolia community using the npm package manager.
While npm was originally built as a package manager for Node.js, it has evolved to be the package manager for front-end development. It has the following benefits:
-
Easy to find packages.
-
Easy to publish and completely self-service.
-
Ability to declare and resolve dependencies to other packages - such as those providing JavaScript or CSS libraries.
-
Wide adoption and large ecosystem of front-end tooling.
The Magnolia Marketplace remains the best address for finding quality modules and integrations of all kinds. Light modules hosted on npm can be contributed for inclusion on the Marketplace.
Finding light modules
Because all shared light modules are published to npm, you can search for them with the term magnolia-light-module using npm CLI or on the npm website.
Guidelines
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 |
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 |
README |
Provide a complete |
Small |
Strive to make your light module small and focused, for example, providing a single component. People can more easily use your module if they understand it and it does not bring in additional things that they do not need - or might conflict with their project. |
Github |
The source control project for the package could be anywhere, but Magnolia recommends Github to enable others to contribute to your project by reporting issues or even providing improvements. |