Skip to content

Commit 9c7308f

Browse files
committed
Add additional gulp config
1 parent 7bac8f5 commit 9c7308f

File tree

4 files changed

+33
-7
lines changed

4 files changed

+33
-7
lines changed

Diff for: .jshintrc

+10-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,16 @@
2323
"plusplus": true,
2424
"undef": true,
2525
"laxbreak": true,
26-
"maxdepth": 3,
26+
"maxdepth": 4,
2727
"loopfunc": true,
28-
"maxcomplexity": 9,
28+
"maxcomplexity": 13,
2929
"maxlen": 80,
30-
"maxparams": 4
30+
"maxparams": 5,
31+
"globals": {
32+
"expect": true,
33+
"it": true,
34+
"describe": true,
35+
"beforeEach": true,
36+
"afterEach": true
37+
}
3138
}

Diff for: gulpfile.js

+17-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
11
'use strict';
22
var gulp = require('gulp'),
3-
shell = require('gulp-shell');
3+
shell = require('gulp-shell'),
4+
jshint = require('gulp-jshint'),
5+
jasmine = require('gulp-jasmine');
46

57
gulp.task('jsdoc', shell.task([
68
'./node_modules/.bin/jsdoc -c ./doc-config.json',
7-
]));
9+
]));
10+
11+
gulp.task('lint', function () {
12+
return gulp.src(['./src/**/*.js'], ['./test/**/*.js'])
13+
.pipe(jshint())
14+
.pipe(jshint.reporter('default'));
15+
});
16+
17+
gulp.task('test', function () {
18+
return gulp.src('test/**/*.spec.js')
19+
.pipe(jasmine());
20+
});
21+
22+
gulp.task('build', ['lint', 'test']);

Diff for: package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@
1111
},
1212
"devDependencies": {
1313
"gulp": "^3.8.10",
14-
"jsdoc": "^3.3.0",
15-
"gulp-shell": "^0.2.11"
14+
"gulp-jasmine": "^1.0.1",
15+
"gulp-jshint": "^1.9.0",
16+
"gulp-shell": "^0.2.11",
17+
"jsdoc": "^3.3.0"
1618
},
1719
"scripts": {
1820
"test": "echo \"Error: no test specified\" && exit 1"

Diff for: readme.md

+2
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ and all `*.spec.js` files will be executed.
6363
Fork the repo and make requred changes. After that push your changes in branch, which is named according to the changes you did.
6464
Initiate the PR.
6565

66+
Make sure you're editor makes validations according to the `.jshintrc` in the root directory of the repository.
67+
6668
## Contributors
6769

6870
[![mgechev](https://avatars.githubusercontent.com/u/455023?v=3&s=117)](https://github.com/mgechev)[![AndreyGeonya](https://avatars.githubusercontent.com/u/773648?v=3&s=117)](https://github.com/AndreyGeonya)[![Microfed](https://avatars.githubusercontent.com/u/613179?v=3&s=117)](https://github.com/Microfed)[![contra](https://avatars.githubusercontent.com/u/425716?v=3&s=117)](https://github.com/contra)

0 commit comments

Comments
 (0)