Skip to content

Commit f50a31a

Browse files
committed
WA开发环境:增加 jshint 校验过程
1 parent c36ec14 commit f50a31a

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

.jshintrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"newcap": true,
1313
"noarg": true,
1414
"quotmark": "single",
15-
"regexp": true,
1615
"undef": true,
1716
"unused": true,
1817
"strict": true,

gulpfile.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,19 @@ gulp.task('server:dist', ['build'], function () {
6767
open('http://localhost:9999');
6868
});
6969

70+
/**
71+
* =====================================
72+
* Linting
73+
* =====================================
74+
*/
75+
76+
gulp.task('lint', function(){
77+
return gulp.src(SOURCE_ROOT + '/scripts/**/*.js')
78+
.pipe($.jshint('.jshintrc'))
79+
.pipe($.jshint.reporter('jshint-stylish'))
80+
.pipe($.size());
81+
});
82+
7083
/**
7184
* =====================================
7285
* Building

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Protoshp/Web",
33
"homepage": "http://protoshop.io",
4-
"version": "0.1.2",
4+
"version": "0.1.1",
55
"repository": {
66
"type": "git",
77
"url": "[email protected]:wxd-pd/wxd-uitool.git"
@@ -19,7 +19,7 @@
1919
"gulp-connect": "~1.0.7",
2020
"gulp-exec": "~1.0.4",
2121
"gulp-autoprefixer": "~0.0.6",
22-
"gulp-jshint": "^1.4.2",
22+
"gulp-jshint": "^1.5.0",
2323
"gulp-imagemin": "~0.1.5",
2424
"gulp-clean": "~0.2.4",
2525
"gulp-cache": "~0.1.1",
@@ -31,7 +31,8 @@
3131
"tiny-lr": "*",
3232
"connect-livereload": "*",
3333
"open": "*",
34-
"gulp-concat": "^2.1.7"
34+
"gulp-concat": "^2.1.7",
35+
"jshint-stylish": "^0.1.5"
3536
},
3637
"engines": {
3738
"node": ">=0.10.0"

0 commit comments

Comments
 (0)