-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
44 lines (35 loc) · 963 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
const gulp = require('gulp');
const browserSync = require('browser-sync').create();
const pkg = require('./package.json');
const del = require('del');
// Copy third party libraries from /node_modules into /vendor
gulp.task('vendor', async function() {
del('vendor/**', {force:true});
// Bootstrap
gulp.src([
'./node_modules/bootstrap/dist/**/**.min.**',
])
.pipe(gulp.dest('./vendor/bootstrap'));
// jQuery
gulp.src([
'./node_modules/jquery/dist/jquery.min.js'
])
.pipe(gulp.dest('./vendor/jquery'))
})
// Default task
gulp.task('default', gulp.series('vendor', async function() {
return 0;
}));
// Configure the browserSync task
gulp.task('browserSync', async function() {
browserSync.init({
server: {
baseDir: "./"
}
});
});
// Dev task
gulp.task('dev', gulp.series('browserSync', function() {
gulp.watch('./css/*.css', browserSync.reload);
gulp.watch('./*.html', browserSync.reload);
}));