forked from eclipse-che/che-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
31 lines (27 loc) · 666 Bytes
/
gulpfile.js
File metadata and controls
31 lines (27 loc) · 666 Bytes
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
'use strict'
const antora = require('@antora/site-generator')
const connect = require('gulp-connect')
const gulp = require('gulp')
function generate(done) {
antora(['--playbook', 'antora-playbook-for-development.yml'], process.env)
.then(() => done())
.catch((err) => {
console.log(err)
done()
})
connect.reload()
}
async function serve(done) {
connect.server({
name: 'Preview Site',
livereload: true,
host: '0.0.0.0',
port: 4000,
root: './build/site'
});
gulp.watch(['./modules/**/*'], generate)
}
exports.default = gulp.series(
generate,
serve,
);