forked from sahat/satellizer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
39 lines (32 loc) · 1 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
var gulp = require('gulp');
var rename = require("gulp-rename");
var plumber = require('gulp-plumber');
var uglify = require('gulp-uglify');
var complexity = require('gulp-complexity');
gulp.task('minify', function() {
return gulp.src('satellizer.js')
.pipe(plumber())
.pipe(uglify())
.pipe(rename('satellizer.min.js'))
.pipe(gulp.dest('.'))
});
gulp.task('copy', function() {
return gulp.src(['satellizer.js', 'satellizer.min.js'])
.pipe(gulp.dest('examples/client/vendor'));
});
gulp.task('complexity', function() {
return gulp.src('satellizer.js')
.pipe(complexity());
});
gulp.task('watch', function() {
gulp.watch('satellizer.js', ['copy', 'minify']);
});
gulp.task('php', function() {
return gulp.src('examples/client/**/*.*')
.pipe(gulp.dest('examples/server/php/public'))
});
gulp.task('java', function() {
return gulp.src('examples/client/**/*.*')
.pipe(gulp.dest('examples/server/java/src/main/resources/assets'))
});
gulp.task('default', ['copy', 'minify', 'watch']);