-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgulpfile.js
59 lines (55 loc) · 1.27 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
var gulp = require('gulp');
var debug = require('gulp-debug');
var babel = require('gulp-babel');
var jasmine = require('gulp-jasmine');
var reporters = require('jasmine-reporters');
var eslint = require('gulp-eslint');
var taskListing = require('gulp-task-listing');
/**
* List tasks with `glup list`.
*/
gulp.task('tasks', taskListing);
/**
* Lint the project using the `.eslintrc` provided.
*/
gulp.task('lint', function() {
var stream = gulp.src([
"./lib/*.js",
"./test/jasmine/specs/*.js",
"./*.js"
])
.pipe(debug())
.pipe(eslint({
useEslintrc: true
}))
.pipe(eslint.format())
.pipe(eslint.failOnError());
return stream;
});
/**
* Run jasmine specs
*/
gulp.task('test', ['compile'], function() {
var stream = gulp.src("./test/jasmine/specs/**/*Spec.js").pipe(jasmine({
'verbose': true,
'includeStackTrace': true,
'reporter': new reporters.TerminalReporter({
isVerbose: true,
includeStackTrace: true,
showColors: true
})
}));
return stream;
});
/**
* Transpile to ES5 so we can use ES.next today.
*/
gulp.task('compile', ['lint'], function() {
var stream = gulp.src([
"./lib/*.js",
"./*.js"
])
.pipe(babel({}))
.pipe(gulp.dest("./target/babeled"));
return stream;
});