mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
Settig up a linting task for src/
This commit is contained in:
parent
9aeff6be2d
commit
bd2633acf4
15
gulpfile.js
15
gulpfile.js
@ -10,6 +10,12 @@ var rename = require('gulp-rename');
|
||||
var istanbul = require('gulp-istanbul');
|
||||
var bump = require('gulp-bump');
|
||||
var tag_version = require('gulp-tag-version');
|
||||
var jshint = require('gulp-jshint');
|
||||
var stylish = require('jshint-stylish');
|
||||
|
||||
var paths = {
|
||||
scripts: ['./src/*.js']
|
||||
};
|
||||
|
||||
gulp.task('jison2', function() {
|
||||
return gulp.src('./src/*.jison')
|
||||
@ -151,4 +157,11 @@ function inc(importance) {
|
||||
|
||||
gulp.task('patch', function() { return inc('patch'); })
|
||||
gulp.task('feature', function() { return inc('minor'); })
|
||||
gulp.task('release', function() { return inc('major'); })
|
||||
gulp.task('release', function() { return inc('major'); })
|
||||
|
||||
// Using gulp-jshint and jshint-stylish
|
||||
gulp.task('lint', function() {
|
||||
return gulp.src(paths.scripts)
|
||||
.pipe(jshint())
|
||||
.pipe(jshint.reporter(stylish));
|
||||
});
|
||||
|
@ -29,6 +29,7 @@
|
||||
"gulp-istanbul": "^0.4.0",
|
||||
"gulp-jasmine": "~1.0.1",
|
||||
"gulp-jison": "~1.0.0",
|
||||
"gulp-jshint": "^1.9.0",
|
||||
"gulp-less": "^1.3.6",
|
||||
"gulp-rename": "~1.2.0",
|
||||
"gulp-shell": "^0.2.10",
|
||||
@ -37,6 +38,7 @@
|
||||
"he": "^0.5.0",
|
||||
"jasmine": "~2.0.1",
|
||||
"jison": "~0.4.15",
|
||||
"jshint-stylish": "^1.0.0",
|
||||
"karma": "~0.12.20",
|
||||
"karma-chrome-launcher": "~0.1.5",
|
||||
"karma-jasmine": "~0.2.1",
|
||||
|
Loading…
x
Reference in New Issue
Block a user