【发布时间】:2016-01-22 03:47:43
【问题描述】:
我有一个简单的 gulpfile.js,当我尝试运行 gulp 样式时,我在 .在 .pipe 中,为什么?
1 var gulp = require('gulp');
2 var jshint = require('gulp-jshint');
3
4 var jsFiles = ['*.js', 'src/**/*.js'];
5
6 gulp.task('style', function(){
7 gulp.src(jsFiles)
8 .pipe(jshint())
9 .pipe(jshint.reporter('jshint-stylish',{
10 verbose: true
11 }));
12 })
我的 Package.json:
1 {
2 "name": "app",
3 "version": "1.0.0",
4 "description": "",
5 "main": "app.js",
6 "scripts": {
7 "test": "echo \"Error: no test specified\" && exit 1",
8 "start": "node app.js"
9 },
10 "author": "",
11 "license": "ISC",
12 "dependencies": {
13 "express": "^4.13.3"
14 },
15 "devDependencies": {
16 "gulp": "^3.9.0",
17 "gulp-jscs": "^3.0.2",
18 "gulp-jshint": "^2.0.0",
19 "jshint-stylish": "^2.1.0"
20 }
21 }
gulp-jshint 和 jshint-stylish 都已安装。
【问题讨论】:
-
您能否粘贴问题中错误的完整堆栈跟踪?
-
没有行号代码会更容易阅读。
标签: javascript node.js gulp