tasks/helpers/task.js
function (taskName, taskFiles) {
  grunt.log.writeln("Versioning files from " + taskName + " task.");
  this.taskName = taskName;

  this.taskConfig = this.getTaskConfig();

  if (!this.taskConfig) {
    grunt.fail.warn("Task '" + this.taskName + "' doesn't exist or doesn't have any configuration.", 1);
  }

  this.taskFiles = taskFiles || this.getFiles();
  if (!this.taskFiles || this.taskFiles.length === 0) {
    grunt.fail.warn("Task '" + this.taskName + "' doesn't have any src-dest file mappings.", 1);
  }

}
function (taskName, taskFiles) {
  grunt.log.writeln("Versioning files from " + taskName + " task.");
  this.taskName = taskName;

  this.taskConfig = this.getTaskConfig();

  if (!this.taskConfig) {
    grunt.fail.warn("Task '" + this.taskName + "' doesn't exist or doesn't have any configuration.", 1);
  }

  this.taskFiles = taskFiles || this.getFiles();
  if (!this.taskFiles || this.taskFiles.length === 0) {
    grunt.fail.warn("Task '" + this.taskName + "' doesn't have any src-dest file mappings.", 1);
  }

}
function ( taskName , taskFiles ) { grunt . log . writeln ( "Versioning files from " + taskName + " task." ) ; this . taskName = taskName ; this . taskConfig = this . getTaskConfig ( ) ; if ( ! this . taskConfig ) { grunt . fail . warn ( "Task '" + this . taskName + "' doesn't exist or doesn't have any configuration." , 1 ) ; } this . taskFiles = taskFiles || this . getFiles ( ) ; if ( ! this . taskFiles || this . taskFiles . length === 0 ) { grunt . fail . warn ( "Task '" + this . taskName + "' doesn't have any src-dest file mappings." , 1 ) ; } }
Create a task instance
@param {string} taskName
@param {Array} [taskFiles]
@constructor
Create a task instance