docs: function download(target, dest, opts, fn) {
  	if (typeof opts === 'function') {
  		fn = opts;
  		opts = null;
  	}
  	opts = opts || {};
  	let clone = opts.clone || false;
  
  	const repo = normalize(target);
  	let url = getUrl(repo, clone);
  	if (url && typeof url === 'object' && url.url) {
  		if (typeof url.clone === 'boolean') {
  			clone = url.clone;
  		}
  		url = url.url;
  	}
  
  	return PromiseA.try(() => {
  		if (clone) {
  			const checkout = repo.checkout && repo.checkout !== 'master' ? repo.checkout : null;
  			debug('Cloning from:', url, checkout ? '#' + checkout : '');
  			return PromiseA.fromCallback(cb => gitclone(url, dest, {checkout}, cb)).then(() => rm(dest + '/.git'));
  		} else {
  			debug('Downloading from:', url);
  			return PromiseA.resolve(downloadUrl(url, dest, {extract: true, strip: 1, mode: '666', headers: {accept: 'application/zip'}}));
  		}
  	}).asCallback(fn);
  }