-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
63 lines (53 loc) · 1.67 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
var gulp = require('gulp'),
jshint = require('gulp-jshint'),
rename = require('gulp-rename'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
asciidoctor = require('gulp-asciidoctor'),
del = require('del');
var PATH_IN_SRC = 'src/';
var PATH_IN_SPECS = 'spec/';
var PATH_IN_DOC = 'doc/';
var PATH_OUT = 'dist/';
var PATH_OUT_BUILD = PATH_OUT + 'build/';
var PATH_OUT_PACKAGE = PATH_OUT + 'package/';
var PATH_OUT_TESTRESULT = PATH_OUT + 'testresults/';
var PATH_OUT_DOC = PATH_OUT + 'doc/';
gulp.task('ServiceScripts', function () {
return gulp.src('./src/rest/**/*.js')
.pipe(jshint())
.pipe(jshint.reporter('jshint-stylish'))
.pipe(concat('rest.min.js'))
.pipe(uglify())
.pipe(gulp.dest(PATH_OUT_TESTRESULT));
});
gulp.task('doc', function () {
return gulp.src(PATH_IN_DOC + '**/api.adoc')
.pipe(asciidoctor({
doctype: 'book'
//attributes: ['showtitle', 'silverlight']
}))
.pipe(gulp.dest(PATH_OUT_DOC));
});
gulp.task('lint', function () {
return gulp.src('src/rest/**/*.js')
.pipe(jshint())
.pipe(jshint.reporter('jshint-stylish'))
.pipe(jshint.reporter('fail'));
});
/*
gulp.task('images', function() {
return gulp.src('src/images/*.png')
.pipe(cache(imagemin({ optimizationLevel: 3, progressive: true, interlaced: true })))
.pipe(gulp.dest('dist/images'))
.pipe(notify({ message: 'Images task complete' }));
});
*/
gulp.task('clean', function () {
return del(['dist/*']);
});
gulp.task('ci', ['clean'], function () {
gulp.start('ServiceScripts');
});
gulp.task('default', ['ci'], function () {
});