-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
54 lines (48 loc) · 1.92 KB
/
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
47
48
49
50
51
52
53
var gulp = require('gulp'),
shell = require('gulp-shell'),
rename = require('gulp-rename'),
browserSync = require('browser-sync').create();
/* dirs */
var assetsDir = 'assets',
bowerDir = 'node_modules',
targetSass = '_sass',
targetCSS = 'css',
targetFont = assetsDir + '/fonts',
targetJs = assetsDir + '/js';
// Task for building blog when something changed:
gulp.task('build', shell.task(['bundle exec jekyll build --watch']));
// Or if you don't use bundle:
// gulp.task('build', shell.task(['jekyll build --watch']));
// Task for serving blog with Browsersync
gulp.task('serve', function () {
browserSync.init({
server: {baseDir: '_site/'},
open: false
});
gulp.watch('_site/**/*.*').on('change', browserSync.reload);
});
gulp.task('default', ['build', 'serve']);
gulp.task('copy_files', function() {
gulp.src(bowerDir + '/reveal.js/lib/**/*')
.pipe(gulp.dest(assetsDir + '/lib'));
gulp.src(bowerDir + '/reveal.js/css/theme/source/**/*')
.pipe(gulp.dest(targetSass + '/theme/source'));
gulp.src(bowerDir + '/reveal.js/css/theme/template/**/*')
.pipe(gulp.dest(targetSass + '/theme/template'));
gulp.src(bowerDir + '/reveal.js/plugin/**/*')
.pipe(gulp.dest(assetsDir + '/plugin'));
gulp.src(bowerDir + '/reveal.js/js/reveal.js')
.pipe(gulp.dest(targetJs));
gulp.src(bowerDir + '/reveal.js/css/reveal.scss')
.pipe(rename('_reveal.scss'))
.pipe(gulp.dest(targetSass));
gulp.src(bowerDir + '/reveal.js/lib/css/zenburn.css')
.pipe(rename('_zenburn.scss'))
.pipe(gulp.dest(targetSass));
gulp.src(bowerDir + '/reveal.js/css/print/paper.css')
.pipe(rename('/print/paper.css'))
.pipe(gulp.dest(targetCSS));
gulp.src(bowerDir + '/reveal.js/css/print/pdf.css')
.pipe(rename('/print/pdf.css'))
.pipe(gulp.dest(targetCSS));
});