LocalMachinepacks.addMachine()

Add a new machine to a machinepack on your local filesystem.

Usage

Hover over inputs/exits for more info.

var LocalMachinepacks = require('machinepack-localmachinepacks');


// Add a new machine to a machinepack on your local filesystem.

LocalMachinepacks.addMachine({

machinepackRootPath: '/Users/mikermcneil/machinepack-foobar',

identity: 'do-something',

friendlyName: 'Do something',

description: 'Do something useful given stuff; maybe return something else.',

extendedDescription: '...lots of words...',

moreInfoUrl: 'http://api.stuff.org/foo/bar?v=3.1',

cacheable: true,

sync: true,

idempotent: true,

inputs: {},

exits: {},

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// Something already exists at destination path- another machine probably already exists with that identity.

alreadyExists: function () {

 

},

// OK.

success: function () {

 

},

});

Inputs

machinepackRootPath required

The path to the machinepack of interest

'/Users/mikermcneil/machinepack-foobar'
identity required

The identity to use in the generated machine file

'do-something'
friendlyName

'Do something'
description

'Do something useful given stuff; maybe return something else.'
extendedDescription

'...lots of words...'
moreInfoUrl

'http://api.stuff.org/foo/bar?v=3.1'
cacheable

true
sync

true
idempotent

true
inputs

{}
exits

{}

Exits

error

An unexpected error occurred.

alreadyExists

Something already exists at destination path- another machine probably already exists with that identity.

success

OK.