forked from kelyvin/jsonresume-theme-caffeine
-
Notifications
You must be signed in to change notification settings - Fork 2
/
gulpfile.js
46 lines (37 loc) · 958 Bytes
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import gulp from 'gulp'
import browserSync from 'browser-sync';
import tasks from './gulp/index.js';
import { resumePath } from './gulp/resume.js'
import { imagesPath } from './gulp/images.js'
const bs = browserSync.create("resume");
const reload = done => {
bs.reload();
done();
}
const watch = () => {
gulp.watch(
imagesPath,
gulp.series(tasks.images, gulp.parallel(tasks.pdf, reload))
);
gulp.watch('app/styles/**/*.scss', gulp.series(tasks.styles, gulp.parallel(tasks.pdf, reload)));
gulp.watch(
[
'app/views/**/*.pug',
resumePath,
'app/pug_utils.js'
],
gulp.series(tasks.resume, tasks.pdf, reload)
);
gulp.watch('app/**/*.ts', gulp.series(tasks.typescript, reload));
};
// @ts-ignore
const serve = (done) => {
bs.init({
server: './public',
index: 'resume.html'
});
done()
}
const dev = gulp.series(tasks.build, serve, watch);
gulp.task('default', dev);
gulp.task('dev', dev);