src/utils/private.js
function zipFolder(zip, ffs, root, dir) {
    dir = dir || '';
    let files = ffs.readdirSync(root + (dir ? '/' + dir : ''));
    files.forEach(file => {
        if (['.ts', '.js.map'].some(e => file.endsWith(e))) {
            return;
        }
        let stat = ffs.statSync(root + (dir ? '/' + dir : '') + '/' + file);
        if (stat.isFile()) {
            zipFile(zip, ffs, root, dir, file);
        }
        else if (stat.isDirectory()) {
            zipFolder(zip, ffs, root, dir ? dir + '/' + file : file);
        }
    });
}
function zipFolder(zip, ffs, root, dir) {
    dir = dir || '';
    let files = ffs.readdirSync(root + (dir ? '/' + dir : ''));
    files.forEach(file => {
        if (['.ts', '.js.map'].some(e => file.endsWith(e))) {
            return;
        }
        let stat = ffs.statSync(root + (dir ? '/' + dir : '') + '/' + file);
        if (stat.isFile()) {
            zipFile(zip, ffs, root, dir, file);
        }
        else if (stat.isDirectory()) {
            zipFolder(zip, ffs, root, dir ? dir + '/' + file : file);
        }
    });
}
function zipFolder ( zip , ffs , root , dir ) { dir = dir || '' ; let files = ffs . readdirSync ( root + ( dir ? '/' + dir : '' ) ) ; files . forEach ( file => { if ( [ '.ts' , '.js.map' ] . some ( e => file . endsWith ( e ) ) ) { return ; } let stat = ffs . statSync ( root + ( dir ? '/' + dir : '' ) + '/' + file ) ; if ( stat . isFile ( ) ) { zipFile ( zip , ffs , root , dir , file ) ; } else if ( stat . isDirectory ( ) ) { zipFolder ( zip , ffs , root , dir ? dir + '/' + file : file ) ; } } ) ; }
PRIVATE Zip Folder
PRIVATE Zip Folder