lib/creator.js
function create(options, cb) {

	options.force = (options.force) ? options.force : false;
	options.preserve = (options.preserve) ? options.preserve : true;
	options.password = getPwHash(options.password);  
	console.log('Gernerating directories with folling options:\n', options, '\n');
	if(options.test) {return;}
	//create directory
	if(options.force || !fs.existsSync(options.dest)) {
		wrench.mkdirSyncRecursive(options.dest);
		wrench.copyDirSyncRecursive(options.src, options.dest, { preserve: options.preserve }); 
	}
	if(options.files.length) {
		_.each(options.files, function(file) {
			fs.exists(path.join(options.dest,options.pwfile), function(exists) {
				if(!exists || options.force || file.force) {
					fs.writeFile(path.join(options.dest,strReplace(file.name, options)),  strReplace(file.data, options), function(err){
						if(err) {throw err;}
					});
				}
			});
		});
	}
	//Search and replace 
	replace(options.dest, {
		filters: ['index\.php$', '\.htaccess']
		, type: 'replace' 
		, values: [{
			user: options.user
			, root: options.root
			, project: options.project
			, title: options.title
			, userDir: options.userDir
			, pwfile: options.pwfile
		}]
	}, function(err, data) {
		if(cb) {
			cb(err, data);
			}
	});
}
function create(options, cb) {

	options.force = (options.force) ? options.force : false;
	options.preserve = (options.preserve) ? options.preserve : true;
	options.password = getPwHash(options.password);  
	console.log('Gernerating directories with folling options:\n', options, '\n');
	if(options.test) {return;}
	//create directory
	if(options.force || !fs.existsSync(options.dest)) {
		wrench.mkdirSyncRecursive(options.dest);
		wrench.copyDirSyncRecursive(options.src, options.dest, { preserve: options.preserve }); 
	}
	if(options.files.length) {
		_.each(options.files, function(file) {
			fs.exists(path.join(options.dest,options.pwfile), function(exists) {
				if(!exists || options.force || file.force) {
					fs.writeFile(path.join(options.dest,strReplace(file.name, options)),  strReplace(file.data, options), function(err){
						if(err) {throw err;}
					});
				}
			});
		});
	}
	//Search and replace 
	replace(options.dest, {
		filters: ['index\.php$', '\.htaccess']
		, type: 'replace' 
		, values: [{
			user: options.user
			, root: options.root
			, project: options.project
			, title: options.title
			, userDir: options.userDir
			, pwfile: options.pwfile
		}]
	}, function(err, data) {
		if(cb) {
			cb(err, data);
			}
	});
}
function create ( options , cb ) { options . force = ( options . force ) ? options . force : false ; options . preserve = ( options . preserve ) ? options . preserve : true ; options . password = getPwHash ( options . password ) ; console . log ( 'Gernerating directories with folling options:\n' , options , '\n' ) ; if ( options . test ) { return ; } //create directory if ( options . force || ! fs . existsSync ( options . dest ) ) { wrench . mkdirSyncRecursive ( options . dest ) ; wrench . copyDirSyncRecursive ( options . src , options . dest , { preserve : options . preserve } ) ; } if ( options . files . length ) { _ . each ( options . files , function ( file ) { fs . exists ( path . join ( options . dest , options . pwfile ) , function ( exists ) { if ( ! exists || options . force || file . force ) { fs . writeFile ( path . join ( options . dest , strReplace ( file . name , options ) ) , strReplace ( file . data , options ) , function ( err ) { if ( err ) { throw err ; } } ) ; } } ) ; } ) ; } //Search and replace  replace ( options . dest , { filters : [ 'index\.php$' , '\.htaccess' ] , type : 'replace' , values : [ { user : options . user , root : options . root , project : options . project , title : options . title , userDir : options . userDir , pwfile : options . pwfile } ] } , function ( err , data ) { if ( cb ) { cb ( err , data ) ; } } ) ; }
Used to create user directory with htacces password-file from a template folder. Will need a rework for more generic functionality...

Deep copy src to the dest
Search and replace in dest
Used to create user directory with htacces password - file from a template folder . Will need a rework for more generic functionality ...