aboutsummaryrefslogtreecommitdiff
path: root/gulpfile.js
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2020-03-06 18:59:09 +0100
committerHakim El Hattab <hakim.elhattab@gmail.com>2020-03-06 18:59:09 +0100
commit027dc259da986363a0c5a5294bcce35404c1c521 (patch)
treeaa7fd3d86cd8a6280b7f222efee7f361763399a3 /gulpfile.js
parent32bbe63ea6c0ad8baefa508cd15f2fda4b0bad5c (diff)
downloadfosdem-2021-minimalism-presentation-027dc259da986363a0c5a5294bcce35404c1c521.tar
fosdem-2021-minimalism-presentation-027dc259da986363a0c5a5294bcce35404c1c521.tar.gz
add webpack, move playback to own module
Diffstat (limited to 'gulpfile.js')
-rw-r--r--gulpfile.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/gulpfile.js b/gulpfile.js
index ec2191b..d6d88a6 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -12,6 +12,7 @@ const connect = require('gulp-connect')
const autoprefixer = require('gulp-autoprefixer')
const yargs = require('yargs')
const pkg = require('./package.json')
+const webpack = require('webpack-stream');
const root = yargs.argv.root || '.'
const port = yargs.argv.port || 8000
@@ -24,9 +25,12 @@ const license = `/*!
* Copyright (C) 2020 Hakim El Hattab, https://hakim.se
*/\n`
+
gulp.task('js', () => gulp.src(['./js/reveal.js'])
.pipe(babel({ presets: ['@babel/preset-env'] }))
- .pipe(uglify())
+ .pipe(webpack({
+ mode: 'production'
+ }))
.pipe(header(license, {pkg: pkg}))
.pipe(rename('reveal.min.js'))
.pipe(gulp.dest('./js')))
@@ -78,7 +82,7 @@ gulp.task('serve', () => {
livereload: true
})
- gulp.watch(['js/reveal.js'], gulp.series('js'))
+ gulp.watch(['js/reveal.js', 'js/src/*.js'], gulp.series('js'))
gulp.watch([
'css/theme/source/*.{sass,scss}',