forked from pubnub/eon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
87 lines (61 loc) · 1.76 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
var bower = require('./bower.json');
console.log(bower)
var gulp = require('gulp');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var cssMin = require('gulp-css');
var pubnub = [
'bower_components/pubnub/web/pubnub.min.js',
'bower_components/subsub/subsub.js'
];
var map = [
'bower_components/eon-map/lib/mapbox.js',
'bower_components/eon-map/pubnub-mapbox.js',
];
var chart = [
'bower_components/d3/d3.min.js',
'bower_components/c3/c3.js',
'bower_components/visibilityjs/lib/visibility.core.js',
'bower_components/eon-chart/pubnub-c3.js'
];
var styles = [
'bower_components/c3/c3.min.css',
'bower_components/eon-map/lib/mapbox.css'
];
var images = [
'bower_components/eon-map/lib/images/*'
];
var map_files = pubnub
.concat(map);
var chart_files = pubnub
.concat(chart);
var all_files = pubnub
.concat(chart)
.concat(map);
gulp.task('map', function(){
gulp.src(map_files)
.pipe(concat('eon-map.js'))
.pipe(gulp.dest('v/eon-map/' + bower.dependencies['eon-map']));
});
gulp.task('chart', function(){
gulp.src(chart_files)
.pipe(concat('eon-chart.js'))
.pipe(gulp.dest('v/eon-chart/' + bower.dependencies['eon-chart']));
});
gulp.task('javascript', function(){
gulp.src(all_files)
.pipe(concat('eon.js'))
.pipe(gulp.dest('v/eon/' + bower.version));
});
gulp.task('css', function(){
gulp.src(styles)
.pipe(concat('eon.css'))
.pipe(gulp.dest('v/eon/' + bower.version));
});
gulp.task('images', function(){
return gulp.src(images)
.pipe(gulp.dest('v/eon-map/' + bower.dependencies['eon-map'] + '/images'))
.pipe(gulp.dest('v/eon/' + bower.version + '/images'))
.pipe(gulp.dest('lib/images'));
});
gulp.task('default', ['map', 'chart', 'javascript', 'css', 'images']);