tasks/npmcopy.js
function convert(files) {
    var converted = []
    files.forEach(function(file) {
      // We need originals as the destinations may not yet exist
      file = file.orig
      var dest = file.dest

      // Use destination for source if no source is available
      if (!file.src.length) {
        converted.push({
          src: dest,
          dest: dest
        })
        return
      }

      file.src.forEach(function(source) {
        converted.push({
          src: source,
          dest: dest
        })
      })
    })
    return converted
  }
function convert(files) {
    var converted = []
    files.forEach(function(file) {
      // We need originals as the destinations may not yet exist
      file = file.orig
      var dest = file.dest

      // Use destination for source if no source is available
      if (!file.src.length) {
        converted.push({
          src: dest,
          dest: dest
        })
        return
      }

      file.src.forEach(function(source) {
        converted.push({
          src: source,
          dest: dest
        })
      })
    })
    return converted
  }
function convert ( files ) { var converted = [ ] files . forEach ( function ( file ) { // We need originals as the destinations may not yet exist file = file . orig var dest = file . dest // Use destination for source if no source is available if ( ! file . src . length ) { converted . push ( { src : dest , dest : dest } ) return } file . src . forEach ( function ( source ) { converted . push ( { src : source , dest : dest } ) } ) } ) return converted }
Convert from grunt to a cleaner format
@param {Array} files
Convert from grunt to a cleaner format