-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
41 lines (31 loc) · 918 Bytes
/
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
'use strict';
const gulp = require('gulp'),
exist = require('@existdb/gulp-exist'),
del = require('del')
const exClient = exist.createClient({
host: 'localhost',
port: '8080',
path: '/exist/xmlrpc',
basic_auth: {user: 'wap', pass: ''}
})
const targetConfiguration = { target: '/db/apps/wap/' }
gulp.task('clean', function () {
return del(['build/**/*']);
});
// files in project root //
var otherPaths = [
'*.xql',
'icon.png',
'configuration.xml',
'modules/**/*',
];
gulp.task('deploy:other', function () {
return gulp.src(otherPaths, {base: './'})
.pipe(exClient.newer(targetConfiguration))
.pipe(exClient.dest(targetConfiguration))
})
gulp.task('deploy', gulp.series('deploy:other'))
gulp.task('watch', gulp.series('deploy', function () {
gulp.watch(otherPaths, gulp.series('deploy:other'))
}))
gulp.task('default', gulp.series('watch'))