
require('./vendor');
require('./lint');
require('./service-worker');
require('./server');

const gulp = require('gulp');
const m = require('../common.js');

async function serveClient() {
    return gulp.series('lint', 'vendor', 'service-worker', (done) => {
        logger.info('Running `ng serve`. Please copy vendor libraries to server/public.');
        m.serveClient();
        // don't call done so it won't terminate the task
    })();
}

// After the watches are set startup the Server
gulp.task('dev', gulp.series(m.lernaBuild, gulp.parallel('server', serveClient)));

