index.js
function registerTask(Task, name, options) {
  if (this.tasks[name]) {
    log.error(new Error('Task "' + name + '" is already registered.'));
    return;
  }
  if (!Task || !Task.prototype || typeof Task.prototype.run !== 'function') {
    log.error(new Error('Task "' + name + '" should implement "run" method.'));
    return;
  }
  this.tasks[name] = new Task(options || []);
}
function registerTask(Task, name, options) {
  if (this.tasks[name]) {
    log.error(new Error('Task "' + name + '" is already registered.'));
    return;
  }
  if (!Task || !Task.prototype || typeof Task.prototype.run !== 'function') {
    log.error(new Error('Task "' + name + '" should implement "run" method.'));
    return;
  }
  this.tasks[name] = new Task(options || []);
}
function registerTask ( Task , name , options ) { if ( this . tasks [ name ] ) { log . error ( new Error ( 'Task "' + name + '" is already registered.' ) ) ; return ; } if ( ! Task || ! Task . prototype || typeof Task . prototype . run !== 'function' ) { log . error ( new Error ( 'Task "' + name + '" should implement "run" method.' ) ) ; return ; } this . tasks [ name ] = new Task ( options || [ ] ) ; }
Registers damson Task
@param {Function} Task Damson task constructor
@param {string} name Damson task name
@param {object} options Damson task options
Registers damson Task