writeFileToDisk(files) {
		for (var key in files) {

			//construct template and copyTo names
			var fileNames = [];
			if (files[key].folder !== undefined && files[key].copyTo !== undefined && files[key].files !== undefined) {
				//folder of files
				files[key].files.forEach(function (file) {
					fileNames.push({
						template: files[key].folder + file,
						to: files[key].copyTo + file.substr(1)
					});
				});
			} else if (files[key].file && files[key].renameTo){
				//single file
				fileNames.push({
					template: files[key].file,
					to: files[key].renameTo
				});
			} 

			
			//construct params
			var parameters = {};
			if (files[key].parameters) {
				parameters = typeof files[key].parameters === 'function' ?
					files[key].parameters(files[key]) :
					files[key].parameters;
			}
			parameters['config'] = this.configOptions;
			parameters['lodash'] = this._;

			//copy files
			if (fileNames.length > 0) {
				for (var copyKey in fileNames) {
					this.fs.copyTpl(
						this.templatePath(fileNames[copyKey].template),
						this.destinationPath(fileNames[copyKey].to),
						parameters);
				}
			} else if (files[key].folder !== undefined && files[key].copyTo !== undefined) {
				// copy complete folder WITHOUT Templating
				this.fs.copy(
					this.templatePath(files[key].folder),
					this.destinationPath(files[key].copyTo)
				);
			}
		}

	}
/**
 * Writes files given to the disk
 * @param {array} files - the files to be written
 */
Writes files given to the disk
@param {array} files - the files to be written
Writes files given to the disk @param { array } files - the files to be written
writeFileToDisk(files) {
		for (var key in files) {
			var fileNames = [];
			if (files[key].folder !== undefined && files[key].copyTo !== undefined && files[key].files !== undefined) {
				files[key].files.forEach(function (file) {
					fileNames.push({
						template: files[key].folder + file,
						to: files[key].copyTo + file.substr(1)
					});
				});
			} else if (files[key].file && files[key].renameTo){
				fileNames.push({
					template: files[key].file,
					to: files[key].renameTo
				});
			} 
			var parameters = {};
			if (files[key].parameters) {
				parameters = typeof files[key].parameters === 'function' ?
					files[key].parameters(files[key]) :
					files[key].parameters;
			}
			parameters['config'] = this.configOptions;
			parameters['lodash'] = this._;
			if (fileNames.length > 0) {
				for (var copyKey in fileNames) {
					this.fs.copyTpl(
						this.templatePath(fileNames[copyKey].template),
						this.destinationPath(fileNames[copyKey].to),
						parameters);
				}
			} else if (files[key].folder !== undefined && files[key].copyTo !== undefined) {
				this.fs.copy(
					this.templatePath(files[key].folder),
					this.destinationPath(files[key].copyTo)
				);
			}
		}
	}
writeFileToDisk ( files ) { for ( var key in files ) { var fileNames = [ ] ; if ( files [ key ] . folder !== undefined && files [ key ] . copyTo !== undefined && files [ key ] . files !== undefined ) { files [ key ] . files . forEach ( function ( file ) { fileNames . push ( { template : files [ key ] . folder + file , to : files [ key ] . copyTo + file . substr ( 1 ) } ) ; } ) ; } else if ( files [ key ] . file && files [ key ] . renameTo ) { fileNames . push ( { template : files [ key ] . file , to : files [ key ] . renameTo } ) ; } var parameters = { } ; if ( files [ key ] . parameters ) { parameters = typeof files [ key ] . parameters === 'function' ? files [ key ] . parameters ( files [ key ] ) : files [ key ] . parameters ; } parameters [ 'config' ] = this . configOptions ; parameters [ 'lodash' ] = this . _ ; if ( fileNames . length > 0 ) { for ( var copyKey in fileNames ) { this . fs . copyTpl ( this . templatePath ( fileNames [ copyKey ] . template ) , this . destinationPath ( fileNames [ copyKey ] . to ) , parameters ) ; } } else if ( files [ key ] . folder !== undefined && files [ key ] . copyTo !== undefined ) { this . fs . copy ( this . templatePath ( files [ key ] . folder ) , this . destinationPath ( files [ key ] . copyTo ) ) ; } } }
Writes files given to the disk
 @param {array} files - the files to be written
Writes files given to the disk @param { array } files - the files to be written
//construct template and copyTo names //folder of files //single file //construct params //copy files // copy complete folder WITHOUT Templating