async function handleJavascript(file) {
    file = path.join(config.js.src, 'glightbox.js');

    const name = path.basename(file);

    const res = await jscompiler({
        file,
        dest: config.js.dest,
        format: 'umd',
        sourcemap: false,
        moduleID: 'GLightbox'
    }).catch(error => console.log(error));

    if (!res) {
        console.log('Build Error', `View logs for more info`);
        console.log(res)
        return false;
    }

    const minName = name.replace('.js', '.min.js');
    const processed = path.join(config.js.dest, name);
    const code = fs.readFileSync(processed, 'utf8');
    const minified = terser.minify(code);
    const minifyPath = path.join(config.js.dest, minName);
    fs.writeFileSync(minifyPath, minified.code);

    console.log('Javascript Build', `Compiled and Minified ${name}`);
}
Handle Javascript files
compile the javascript files
to es2015, minify and sync the files

@param {string} file path