forked from noopkat/avrgirl-arduino
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
36 lines (30 loc) · 907 Bytes
/
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
var gulp = require('gulp');
var tape = require('gulp-tape');
var tapSpec = require('tap-spec');
var jscs = require('gulp-jscs');
var jshint = require('gulp-jshint');
var stylish = require('jshint-stylish');
function spec() {
return gulp.src(['tests/*.spec.js'])
.pipe(tape({
reporter: tapSpec()
}));
};
function jscs() {
return gulp.src(['tests/*.spec.js', 'tests/helpers/*.js', 'avrgirl-arduino.js', 'lib/*.js'], { base: "./" })
.pipe(jscs({fix: true}))
.pipe(gulp.dest('.'))
.pipe(jscs.reporter())
.pipe(jscs.reporter('fail'))
};
function lint() {
return gulp.src(['tests/*.spec.js', 'tests/helpers/*.js', 'avrgirl-arduino.js', 'lib/*.js'])
.pipe(jshint())
.pipe(jshint.reporter('jshint-stylish'))
.pipe(jshint.reporter('fail'));
};
exports.spec = spec;
exports.jscs = jscs;
exports.lint = lint;
var test = gulp.series(spec);
gulp.task('test', test);