function (fls) {
        if (fs.existsSync(destFolderDir)) {
            console.log(':::~~' + dirName + ' exists, please pick another name or delete previous to create new~~:::')
            deferred.reject(fls.type + ' exists, please pick another name.');
        } else {
            console.log(':::~~' + dirName + ' does not exists, creating new~~:::');
            if (!fs.existsSync(destFolderDir)) {
                fse.ensureDirSync(destFolderDir);
                console.log(':::~~Created new directory:' + fls.type + "/" + dirName + '~~:::');
            }
            //copy refrence directroy data in temporry directory folder
            copyRefToTemp();
            //update folder names, file names and file content in temp folder
            updateTempSubDirNames(fls);
            //copy temporary directroy data in destination directory folder
            copyTempToDest();
            // add tasks to create folder 
            // addWebpackTasks();
            deferred.resolve('successfuly created directory');
        }
        return deferred.promise;
    }
function (fls) {
        if (fs.existsSync(destFolderDir)) {
            console.log(':::~~' + dirName + ' exists, please pick another name or delete previous to create new~~:::')
            deferred.reject(fls.type + ' exists, please pick another name.');
        } else {
            console.log(':::~~' + dirName + ' does not exists, creating new~~:::');
            if (!fs.existsSync(destFolderDir)) {
                fse.ensureDirSync(destFolderDir);
                console.log(':::~~Created new directory:' + fls.type + "/" + dirName + '~~:::');
            }
            //copy refrence directroy data in temporry directory folder
            copyRefToTemp();
            //update folder names, file names and file content in temp folder
            updateTempSubDirNames(fls);
            //copy temporary directroy data in destination directory folder
            copyTempToDest();
            // add tasks to create folder 
            // addWebpackTasks();
            deferred.resolve('successfuly created directory');
        }
        return deferred.promise;
    }
function ( fls ) { if ( fs . existsSync ( destFolderDir ) ) { console . log ( ':::~~' + dirName + ' exists, please pick another name or delete previous to create new~~:::' ) deferred . reject ( fls . type + ' exists, please pick another name.' ) ; } else { console . log ( ':::~~' + dirName + ' does not exists, creating new~~:::' ) ; if ( ! fs . existsSync ( destFolderDir ) ) { fse . ensureDirSync ( destFolderDir ) ; console . log ( ':::~~Created new directory:' + fls . type + "/" + dirName + '~~:::' ) ; } //copy refrence directroy data in temporry directory folder copyRefToTemp ( ) ; //update folder names, file names and file content in temp folder updateTempSubDirNames ( fls ) ; //copy temporary directroy data in destination directory folder copyTempToDest ( ) ; // add tasks to create folder  // addWebpackTasks(); deferred . resolve ( 'successfuly created directory' ) ; } return deferred . promise ; }
sync folder to create new directories with provided Configurations
@param {*} fls
sync folder to create new directories with provided Configurations