Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
};
// Start watch at root of repo.
let rootPath = path.resolve(__dirname, '../..');
console.log(`Starting watch in ${rootPath}`);
gaze(sourceMatch, { cwd: rootPath }, function () {
this.on('all', startRun);
});
});
build.task('w', customWatch);
build.task('serve', serial(
rushBuild,
build.serve,
customWatch
));
// Shortcuts for individual subtasks.
build.task('webpack', build.webpack);
build.task('tslint', build.tslint);
build.task('ts', build.typescript);
// initialize tasks.
build.initialize(gulp);
let child = spawn(
'rush',
['build', '--to', 'todo-app']
);
child.stdout.on('data', data => rawStdout.write(data));
child.on('close', done);
});
const sourceMatch = [
'src/**/*.{ts,tsx,scss,js,txt,html}',
'!src/**/*.scss.ts'
];
build.task('serve', serial(
build.serve,
build.watch(sourceMatch, serial(
rushBuild,
build.reload
))));
build.initialize(require('gulp'));