Skip to content

Latest commit

 

History

History
executable file
·
28 lines (18 loc) · 577 Bytes

contributing.md

File metadata and controls

executable file
·
28 lines (18 loc) · 577 Bytes

Plugin contract:

Plugins can be loaded in a Node.js runtime via:

require('suman-transform-plugins/plugins/x')

this will load the index.js file of your plugin.

Because of the structure of this repo, 'x' should be a unique name.

Your index.js file should have the following contract:

const fs = require('fs');
const path = require('path');

exports.getTransformStream = function () {
  return fs.createReadStream(exports.getTransformPath());
};

exports.getTransformPath = function(){
  return path.resolve(__dirname + '/index.sh');
};