function copyNodeJSCodeTask() { log('building and copying server code into the directory') return webpack_stream(webpack_config) .pipe(dest(`${paths.prod_build}`)) }
mailListener.on("server:disconnected", () => { log(logSymbols.error, `E-Mail listener disconnected. Attempting reconnect...`) setTimeout(() => { mailListener.restart() }, 5* 1000) })
fs.readFile(certfile, 'utf8', function(err, certdata){ if(err) { log.error("Could not read certificate file."); errorresponse({ code:101, message:"Internal server error."}, res); } else { respond({ success: true, cert: certdata }, res); } });
gulp.task('test', function () { return gulp .src('fixtures/test.js') .pipe( tape({ bail: true, nyc: true }) ) .on('error', function (error) { log(error.message) process.exit(1) }) })
/** * Make sure that only one mail is being handled at a time */ function runOneAtATime(mail) { if (runningMailHandler) { setTimeout(runOneAtATime, 100, mail); } else { runningMailHandler = true; handleMail(mail); log(logSymbols.info, 'Listening for new TradeingView notifications...'); runningMailHandler = false; } }
function clean() { log('removing the old files in the directory') return del('../prod-build/**', {force:true}); }
var stopServer = function() { ocsp.kill('SIGHUP'); log("OCSP server stopped."); }
function copyReactCodeTask() { log('copying React code into the directory') return src(`${paths.react_src}`) .pipe(dest(`${paths.react_dist}`)); }
function zippingTask() { log('zipping the code ') return src(`${paths.prod_build}/**`) .pipe(zip(`${paths.zipped_file_name}`)) .pipe(dest(`${paths.prod_build}`)) }
rpc.on('ready', () => { log(`Connected to Discord! (${appClient})`); global.intloop = setInterval(checkSpotify, 1500); });
mailListener.on("error", (err) => { log(logSymbols.error, "Mail Listener Error:", err) })