forked from openT2T/onboarding
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
33 lines (27 loc) · 918 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
"use strict";
const NO_MODULES = '!**/node_modules/**';
var gulp = require('gulp');
var xmlValidator = require('gulp-xml-validator');
var eslint = require('gulp-eslint');
var NamingfaceValidator = require('./verifiers/namingValidator');
gulp.task('xml-lint', function () {
return gulp.src(['**/*.xml', NO_MODULES])
.pipe(xmlValidator())
});
gulp.task('js-lint', () => {
return gulp.src(['**/*.js', NO_MODULES])
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});
gulp.task('json-lint', () => {
return gulp.src(['**/*.json', NO_MODULES])
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});
gulp.task('validate-naming', function () {
return gulp.src(['**/js/package.json', NO_MODULES])
.pipe(NamingfaceValidator())
});
gulp.task('ci-checks', ['js-lint', 'json-lint', 'xml-lint', 'validate-naming']);