-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgulpfile.js
More file actions
64 lines (55 loc) · 1.44 KB
/
gulpfile.js
File metadata and controls
64 lines (55 loc) · 1.44 KB
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
56
57
58
59
60
61
62
63
64
'use strict';
var Wanted = require('wanted'),
Devour = require('devour'),
gutil = require('gulp-util'),
fs = require('fs'),
hjson = require('hjson');
(function(wanted) {
wanted
.on('install', function(module) {
// accept all module installs/updates
module.accept();
gutil.log(
'Wanted:',
gutil.colors.magenta(module.name),
gutil.colors.cyan(module.state),
gutil.colors.yellow(module.version)
);
})
.on('ready', function() {
fs.readFile(__dirname + '/gulp/config/project.json', function(error, data) {
var config = hjson.parse(String(data)),
push = process.cwd() + '/.push.json';
if (fs.existsSync(push)) {
config.push = require(push);
}
new Devour(config)
// add the kontext task, monitoring and building the public facing javascripts
.task('kontext', [
'!source/*/**/*.js',
'source/kontext.js',
'source/@(extension|provider)/**/*.js'
], [
'!source/@(extension|provider)/**/*.js',
'source/**/*.js'
])
// compile extensions whenever they change
.task('kontext:extensions', [
'./source/@(extension)/**/*.js'
], [
'source/**/*.js'
])
// compile providers whenever they change
.task('kontext:providers', [
'./source/@(provider)/**/*.js'
], [
'source/**/*.js'
])
// ... start devouring
.start()
;
});
})
.check({scope: 'devDependencies'})
;
})(new Wanted());