-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgulpfile.js
40 lines (34 loc) · 1.01 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
'use strict';
var gulp = require('gulp'),
eslint = require('gulp-eslint'),
debug = require('gulp-debug'),
replace = require('gulp-replace'),
jasmine = require('gulp-jasmine');
gulp.task('client-generation', function () {
return gulp.src('gingercode.js')
.pipe(debug({title: 'client-generation (Scope):'}))
.pipe(replace(/module.exports = {(.|\n)*?};/, ''))
.pipe(gulp.dest('client'));
});
gulp.task('test', function () {
gulp.src('test/spec.js')
.pipe(debug({title: 'test (Scope):'}))
.pipe(jasmine())
});
gulp.task('lint', function() {
var filesToLint = [
'**/*.js',
'!tests/protractor.conf.js',
'!dist/**/*',
'!docs/**/*',
'!node_modules/**/*',
'!tmp/**/*',
'!coverage/**/*'
];
return gulp.src(filesToLint)
.pipe(debug({title: 'eslint (Scope):'}))
.pipe(eslint())
.pipe(eslint({fix:true}))
.pipe(eslint.format())
.pipe(gulp.dest('.'));
});