plugin.js 479 B

12345678910111213141516
  1. // Various utilties exposed to plugins
  2. require('./shell'); // Create the ShellJS instance (mandatory)
  3. var common = require('./src/common');
  4. var exportedAttributes = [
  5. 'error', // For signaling errors from within commands
  6. 'parseOptions', // For custom option parsing
  7. 'readFromPipe', // For commands with the .canReceivePipe attribute
  8. 'register', // For registering plugins
  9. ];
  10. exportedAttributes.forEach(function (attr) {
  11. exports[attr] = common[attr];
  12. });