-
Notifications
You must be signed in to change notification settings - Fork 4
/
registry.js
55 lines (44 loc) · 1.45 KB
/
registry.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
52
53
54
55
const util = require('util');
const environment = require('./gulp/environment');
const DefaultRegistry = require('undertaker-registry');
function MagesuiteRegistry() {
DefaultRegistry.call(this);
}
util.inherits(MagesuiteRegistry, DefaultRegistry);
MagesuiteRegistry.prototype.init = function(taker) {
taker.task(require('./gulp/tasks/buildWebpack'));
taker.task(require('./gulp/tasks/copyDocs'));
taker.task(require('./gulp/tasks/copyHtml'));
taker.task(require('./gulp/tasks/copyImages'));
taker.task(require('./gulp/tasks/copyScripts'));
taker.task(require('./gulp/tasks/copyUnchanged'));
taker.task(require('./gulp/tasks/collectViewXml'));
taker.task(require('./gulp/tasks/clean'));
taker.task(require('./gulp/tasks/cleanCache'));
taker.task(require('./gulp/tasks/browserSync'));
taker.task(
'build',
taker.series(
'clean',
'collectViewXml',
taker.parallel(
'buildWebpack',
'copyDocs',
'copyHtml',
'copyScripts',
'copyImages',
'copyUnchanged'
),
'cleanCache'
)
);
taker.task(
'watch',
taker.series(function enableWatch(done) {
environment.watch = true;
done();
}, 'build')
);
taker.task('serve', taker.series('watch', 'browserSync'));
};
module.exports = new MagesuiteRegistry();