-
Notifications
You must be signed in to change notification settings - Fork 13
/
gulpfile.js
38 lines (31 loc) · 1.06 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
const gulp = require('gulp');
const jasmine = require('gulp-jasmine');
const shell = require('gulp-shell')
const gutil = require('gulp-util');
const path = require('path');
const sequence = require('run-sequence');
const clean = require('gulp-clean');
gulp.task('clear-test', function() {
return gulp.src('spec/tmp/page.pdf', {read: false}).pipe(clean());
});
gulp.task('test', ['clear-test'], function() {
return gulp.src('spec/*-test.js').pipe(jasmine({verbose:true}));
});
gulp.task('java-compile', shell.task([
'javac -classpath .:"' + path.join(__dirname, 'src-library/*')
+ '" ' + path.join(__dirname, 'src/main/java/br/com/appmania/*.java')
]));
gulp.task('java-copy', function() {
return gulp.src('src/main/java/**/*.class')
.pipe(gulp.dest('out/production/node-pdfbox'));
});
gulp.task('java-clean', function() {
return gulp.src('src/main/java/**/*.class')
.pipe(clean());
});
gulp.task('compile', function(done) {
sequence('java-compile', 'java-copy', 'java-clean', done);
});
gulp.task('default', function(done) {
sequence('compile', 'test', done);
});