Skip to content

Commit

Permalink
add jshint to gulp..lint and dist
Browse files Browse the repository at this point in the history
  • Loading branch information
ponelat committed Apr 29, 2015
1 parent 69bf18a commit 558cc92
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
12 changes: 11 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ var connect = require('gulp-connect');
var header = require('gulp-header');
var pkg = require('./package.json');
var order = require('gulp-order');
var jshint = require('gulp-jshint');
var banner = ['/**',
' * <%= pkg.name %> - <%= pkg.description %>',
' * @version v<%= pkg.version %>',
Expand Down Expand Up @@ -48,10 +49,19 @@ function templates() {
.on('error', log);
}

/**
* JShint all *.js files
*/
gulp.task('lint', function () {
return gulp.src('./src/main/javascript/**/*.js')
.pipe(jshint())
.pipe(jshint.reporter('jshint-stylish'));
});

/**
* Build a distribution
*/
gulp.task('dist', ['clean'], function() {
gulp.task('dist', ['clean','lint'], function() {

return es.merge(
gulp.src([
Expand Down
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"name": "swagger-ui",
"author": "Tony Tam <[email protected]>",
"contributors": [{
"name": "Mohsen Azimi",
"email": "[email protected]"
}],
"contributors": [
{
"name": "Mohsen Azimi",
"email": "[email protected]"
}
],
"description": "Swagger UI is a dependency-free collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API",
"version": "2.1.2-M2",
"homepage": "http://swagger.io",
Expand Down Expand Up @@ -35,13 +37,15 @@
"gulp-declare": "^0.3.0",
"gulp-handlebars": "^3.0.1",
"gulp-header": "^1.2.2",
"gulp-jshint": "^1.10.0",
"gulp-less": "^3.0.1",
"gulp-order": "^1.1.1",
"gulp-rename": "^1.2.0",
"gulp-uglify": "^1.1.0",
"gulp-watch": "^4.1.1",
"gulp-wrap": "^0.11.0",
"http-server": "git+https://github.com/nodeapps/http-server.git",
"jshint-stylish": "^1.0.1",
"less": "^2.4.0",
"mocha": "^2.1.0",
"selenium-webdriver": "^2.45.0",
Expand Down

0 comments on commit 558cc92

Please sign in to comment.