-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
51 lines (39 loc) · 1.21 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
var gulp = require('gulp');
var include = require('gulp-html-tag-include');
var deploy = require('gulp-gh-pages');
// Mueve archivos de assets
gulp.task('mover', ['moverReveal', 'moverAssets']);
gulp.task('html-include', function () {
return gulp.src('src/slides/*.html')
.pipe(include())
.pipe(gulp.dest('build'));
});
gulp.task('watch', ['html-include', 'mover'], function () {
return gulp.watch([
'./slides/*.html',
'./templates/*.html',
'./assets/**/*'
], ['html-include', 'mover']);
});
gulp.task('default', ['watch']);
// Mueve archivos de assets
gulp.task('moverAssets', function () {
return gulp.src('assets/**')
.pipe(gulp.dest('build'));
});
// Mueve archivos de revealjs
gulp.task('moverReveal', function () {
return gulp.src(['node_modules/reveal.js/css/**/*.css',
'node_modules/reveal.js/js/**/*.js',
'node_modules/reveal.js/lib/**',
'node_modules/reveal.js/plugin/**'],
{base: './node_modules/reveal.js/'})
.pipe(gulp.dest('build'));
});
/**
* Push build to gh-pages
*/
gulp.task('deploy', ['html-include', 'mover'], function () {
return gulp.src("./build/**/*")
.pipe(deploy())
});