code: function (data, files, cb) {
      var outDir = data.outDir;
      var zipfilename = Mustache.render(data.template, data);
      var outfile = path.join(outDir, zipfilename);
  
      // store the output zip file name on the task data
      data.outfile = outfile;
  
      var zipfile = zip.create(outfile);
  
      async.each(
        files,
  
        function (file, next) {
          var src = file.src[0];
          var dest = file.dest || src;
  
          if (isFile(src)) {
            grunt.log.writeln('adding file ' + src + ' to package as ' + dest);
            zipfile.addFile(src, dest, next);
          }
          // screen out the '.' directory to avoid a spurious entry
          else if (isDirectory(src) && dest !== '.') {
            grunt.log.writeln('adding directory ' + src + ' to package as ' + dest);
            zipfile.addDirectory(dest, next);
          }
          else {
            next();
          }
        },
  
        function (err) {
          if (err) {
            grunt.fatal(err.message);
          }
          else {
            grunt.log.writeln('\npackage written to:\n' + outfile);
            zipfile.writeToFile(cb);
          }
        }
      );
    }
docs: files is a grunt files object: an array with objects which map from src to dest