-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
70 lines (62 loc) · 2.02 KB
/
Copy pathgulpfile.js
File metadata and controls
70 lines (62 loc) · 2.02 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
65
66
67
68
69
70
var gulp = require('gulp'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
watch = require('gulp-watch'),
babel = require("gulp-babel"),
sass = require('gulp-sass'),
minifyCSS = require('gulp-minify-css'),
jslint = require('gulp-jslint'),
rename = require('gulp-rename'),
karma = require('gulp-karma'),
testFiles = ['js/cet.min.js', 'spec/test.js'];
gulp.task('default', function() {
gulp.src([
'app/config/config.js',
'app/components/table/createTable.js',
'app/components/table/tableServices.js',
'app/components/table/tableEffects.js',
'app/components/table/listTableOptions.js',
'app/components/table/plugins/graphs/tableGraphs.js',
'app/components/table/plugins/downloads/tableDownloads.js',
'app/components/table/plugins/searcher/tableSearcher.js'
])
.pipe(concat('cet.min.js'))
.pipe(babel())
.pipe(uglify())
.pipe(gulp.dest('js/'));
gulp.src('styles/styles.scss')
.pipe(sass())
.pipe(minifyCSS({
keepBreaks: true
}))
.pipe(rename('styles.min.css'))
.pipe(gulp.dest('css'))
gulp.src(testFiles)
.pipe(karma({
configFile: 'karma.conf.js',
action: 'run'
}))
.on('error', function(err) {
throw err;
});
});
gulp.task('watch', function() {
gulp.watch([
'app/config/config.js',
'app/components/table/createTable.js',
'app/components/table/tableEffects.js',
'app/components/table/tableServices.js',
'app/components/table/listTableOptions.js',
'app/components/table/plugins/graphs/tableGraphs.js',
'app/components/table/plugins/downloads/tableDownloads.js',
'app/components/table/plugins/searcher/tableSearcher.js',
'spec/test.js'
], function() {
gulp.start('default');
});
gulp.watch([
'styles/styles.scss'
], function() {
gulp.start('default');
});
});