forked from sdepold/jquery-rss
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
52 lines (45 loc) · 1.2 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
'use strict';
// 3rd-party modules
var buster = require('gulp-busterjs');
var gulp = require('gulp');
var jscs = require('gulp-jscs');
var jshint = require('gulp-jshint');
var mdBlock = require('gulp-markdown-code-blocks');
var runSequence = require('run-sequence');
gulp.task('default', function (done) {
runSequence('lint', 'test', done);
});
gulp.task('test', function (done) {
runSequence('test-integration', done);
});
gulp.task('lint', function (done) {
runSequence('lint-code', 'lint-readme', done);
});
gulp.task('lint-code', function () {
return gulp
.src([
'./gulpfile.js',
'./spec/**/*.js',
'./src/**/*.js'
])
.pipe(jscs())
.pipe(jshint())
.pipe(jshint.reporter('default'))
.pipe(jshint.reporter('fail'));
});
gulp.task('lint-readme', function () {
return gulp
.src('./README.md')
.pipe(mdBlock());
});
gulp.task('test-integration', function () {
return gulp
.src('./spec/**/*.spec.js')
.pipe(buster({
name: 'integration',
environment: 'browser',
libs: ['lib/*.js', 'node_modules/moment/min/moment.min.js'],
sources: ['dist/jquery.rss.min.js'],
useHeadlessBrowser: true
}));
});