Socket
Socket
Sign inDemoInstall

mimosa-adhoc-module

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mimosa-adhoc-module

Allows for creation of local adhoc/one-off mimosa modules


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
3.79 kB
Created
Weekly downloads
 

Readme

Source

mimosa-adhoc-module

Overview

This module allows for linking node code in your app, or on your file system, directly into a Mimosa workflow. This is great for small one off tasks that don't make sense as NPM modules.

For more information regarding Mimosa, see http://mimosa.io.

Usage

Add 'adhoc-module' to your list of modules. Mimosa will install the module for you when you start up.

Functionality

This module forwards registation and workflow functions on to your code, allowing local code to be directly linked into Mimosa's workflows. Commands are executed in the order they are provided.

Default Config

adhocModule:
  modules: []
  • modules: An array of require calls. The code required in must expose a registration function. For information on the registration function and how to use it, see virtually any Mimosa module. Here's a simple one.;

Example Config

adhocModule:
  modules: [require('./scripts/module1'), require('./scripts/module2')]

Example code to require

var _execute = function( mimosaConfig, options, next ) {
  // do something appropriate for "beforeInstall", like copy files around
  // or transform files before installing them somewhere
  next();
}

exports.registration = function( mimosaConfig, register ) {
  if ( mimosaConfig.isBuild ) {
    register( ["postBuild"], "beforeInstall", _execute );
  }
};

Keywords

FAQs

Last updated on 03 Apr 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc