Skip to content

Commit

Permalink
WA开发环境:增加 jshint 校验过程
Browse files Browse the repository at this point in the history
  • Loading branch information
amio committed Mar 18, 2014
1 parent c36ec14 commit f50a31a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
1 change: 0 additions & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"newcap": true,
"noarg": true,
"quotmark": "single",
"regexp": true,
"undef": true,
"unused": true,
"strict": true,
Expand Down
13 changes: 13 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,19 @@ gulp.task('server:dist', ['build'], function () {
open('http://localhost:9999');
});

/**
* =====================================
* Linting
* =====================================
*/

gulp.task('lint', function(){
return gulp.src(SOURCE_ROOT + '/scripts/**/*.js')
.pipe($.jshint('.jshintrc'))
.pipe($.jshint.reporter('jshint-stylish'))
.pipe($.size());
});

/**
* =====================================
* Building
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Protoshp/Web",
"homepage": "http://protoshop.io",
"version": "0.1.2",
"version": "0.1.1",
"repository": {
"type": "git",
"url": "[email protected]:wxd-pd/wxd-uitool.git"
Expand All @@ -19,7 +19,7 @@
"gulp-connect": "~1.0.7",
"gulp-exec": "~1.0.4",
"gulp-autoprefixer": "~0.0.6",
"gulp-jshint": "^1.4.2",
"gulp-jshint": "^1.5.0",
"gulp-imagemin": "~0.1.5",
"gulp-clean": "~0.2.4",
"gulp-cache": "~0.1.1",
Expand All @@ -31,7 +31,8 @@
"tiny-lr": "*",
"connect-livereload": "*",
"open": "*",
"gulp-concat": "^2.1.7"
"gulp-concat": "^2.1.7",
"jshint-stylish": "^0.1.5"
},
"engines": {
"node": ">=0.10.0"
Expand Down

0 comments on commit f50a31a

Please sign in to comment.