Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@magnolia/magnolia-build

magnolia495GPL-3.00.5.3

Build tool for Magnolia light modules

readme

Magnolia build tools

This is a simple NPM tool meant to help with Magnolia light development. What it will do is scan a node_modules folder for Magnola light modules, and extract them to a directory of choice, light-modules by default. That way you can point your Magnolia instance's resource dir to that particular folder, and easily get started working on light modules. A Magnolia light module is an NPM package defined by the magnolia-light-module keyword in its package.json.

Install

We recommend you install the module by using npm install --save-dev @magnolia/magnolia-build in your project. This way, it'll be both added to your package.json devDependencies and installed, in one command.

We then recommend you add the following script to your package.json:

"scripts": {
  "build": "magnolia-build"
},

This way, you can use npm run build.

Usage

The default output directory light-modules can be overriden by specifying an argument to the command in the following way:

magnolia-build [dist]

This module can also be used in scripts such as Gulp files.

var build = require('@magnolia/magnolia-build');
build('node_modules', 'light-modules');