-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
40 lines (32 loc) · 1012 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
var gulp = require('gulp'),
shell = require('gulp-shell'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
rename = require('gulp-rename'),
browserSync = require('browser-sync').create();
//* Scripts
gulp.task('themejs', function() {
gulp.src(['./js/jquery*.js', './js/responsive-menu.js'])
.pipe(concat('theme-concat.js'))
.pipe(uglify())
.pipe(rename({
basename: "theme",
suffix: '.min'
}))
.pipe(gulp.dest('./js'));
});
//* Run Jekyll build and serve commands
gulp.task('build', shell.task(['jekyll build --config "_config.yml,_config-dev.yml" --watch']));
//* BrowserSync
gulp.task('browser-sync', function () {
browserSync.init({
server: {
baseDir: '_site/'
},
// browser: '/opt/firefox-dev/firefox',
reloadDelay: 500
});
gulp.watch('_site/**/*.*').on('change', browserSync.reload);
});
//* Default task (build and serve)
gulp.task('default', ['build', 'browser-sync']);