mirror of
https://github.com/Shopify/draggable.git
synced 2025-12-08 20:15:56 +00:00
24 lines
747 B
JavaScript
24 lines
747 B
JavaScript
import gulp from 'gulp';
|
|
|
|
import {reloadServer, startServer} from './server';
|
|
import {scripts} from './tasks/scripts';
|
|
import {styles} from './tasks/styles';
|
|
import {extAllViews, views} from './tasks/views';
|
|
|
|
function reportWatchStats(path) {
|
|
console.log(`File ${path} was changed`);
|
|
}
|
|
|
|
export function watch() {
|
|
startServer();
|
|
|
|
gulp.watch(['packages/**/*.js', 'src/**/*.js'], gulp.series(scripts, reloadServer));
|
|
|
|
// only need to watch `styles` task, as it will `stream` changes to the server
|
|
const watchStyles = gulp.watch('src/**/*.scss', styles);
|
|
watchStyles.on('change', reportWatchStats);
|
|
|
|
const watchViews = gulp.watch(`src/**/${extAllViews}`, gulp.series(views, reloadServer));
|
|
watchViews.on('change', reportWatchStats);
|
|
}
|