aboutsummaryrefslogtreecommitdiff
path: root/gulpfile.js
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2020-03-05 11:35:20 +0100
committerHakim El Hattab <hakim.elhattab@gmail.com>2020-03-05 11:35:20 +0100
commitfc308707019ef096b0315d14689d821b71f0c180 (patch)
tree700520d97fd42c7ef17e0fd8f3d7768bf02c7a9f /gulpfile.js
parent2184a5058a1f9886daf14ff4fc188813058d3a58 (diff)
downloadfosdem-2021-minimalism-presentation-fc308707019ef096b0315d14689d821b71f0c180.tar
fosdem-2021-minimalism-presentation-fc308707019ef096b0315d14689d821b71f0c180.tar.gz
build updates, gulp serve accepts root/port
Diffstat (limited to 'gulpfile.js')
-rw-r--r--gulpfile.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/gulpfile.js b/gulpfile.js
index 6967bbb..c690f3a 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -9,8 +9,12 @@ const rename = require('gulp-rename')
const minify = require('gulp-clean-css')
const connect = require('gulp-connect')
const autoprefixer = require('gulp-autoprefixer')
+const yargs = require('yargs')
const pkg = require('./package.json')
+const root = yargs.argv.root || '.'
+const port = yargs.argv.port || 8000
+
const license = `/*!
* reveal.js <%= pkg.version %> (<%= new Date().toDateString() %>)
* <%= pkg.homepage %>
@@ -43,7 +47,7 @@ gulp.task('css', gulp.parallel('css-themes', 'css-core'))
gulp.task('test', gulp.series(
- () => gulp.src(['./js/reveal.js']).pipe(eslint()).pipe(eslint.format()),
+ () => gulp.src(['./js/reveal.js', 'gulpfile.js']).pipe(eslint()).pipe(eslint.format()),
() => gulp.src(['./test/*.html']).pipe(qunit())
))
@@ -67,10 +71,9 @@ gulp.task('package', gulp.series('default', () =>
gulp.task('serve', () => {
connect.server({
- root: '.',
- livereload: true,
- open: true,
- useAvailablePort: true
+ root: root,
+ port: port,
+ livereload: true
})
gulp.watch(['js/reveal.js'], gulp.series('js'))