gulp.src 不是函数
gulp.src is not a function
我想使用 gulp 连接然后最小化我的 Javascript 个文件。
但我什至连第一部分都做不到 运行。我不断收到一条错误消息 "gulp.src is not a function"。
我在全局和我正在使用的目录中都安装了 gulp。
在另一个目录中,我使用 gulp 编译我的 Sass 文件就好了。
这个任务有什么问题?
'use strict';
var gulp = require('gulp'),
concat = require('gulp-concat');
/* Concatenate Javascript files needed to be referenced in the header. */
gulp.task("concatHeaderJS", function() {
gulp.scr([ // what to concat, can also be strings
'inc/js/zebra_dialog.js', // order matters
'inc/js/gx-zebra_dialog.js',
'inc/js/gx-sidebar-nav.js'])
.pipe(concat("header_files_concat.js")) // where to send result
.pipe(gulp.dest("inc/js")); // folder for result to end in
});
将 gulp.scr
更改为 gulp.src
。就是错字人生
我想使用 gulp 连接然后最小化我的 Javascript 个文件。
但我什至连第一部分都做不到 运行。我不断收到一条错误消息 "gulp.src is not a function"。
我在全局和我正在使用的目录中都安装了 gulp。 在另一个目录中,我使用 gulp 编译我的 Sass 文件就好了。
这个任务有什么问题?
'use strict';
var gulp = require('gulp'),
concat = require('gulp-concat');
/* Concatenate Javascript files needed to be referenced in the header. */
gulp.task("concatHeaderJS", function() {
gulp.scr([ // what to concat, can also be strings
'inc/js/zebra_dialog.js', // order matters
'inc/js/gx-zebra_dialog.js',
'inc/js/gx-sidebar-nav.js'])
.pipe(concat("header_files_concat.js")) // where to send result
.pipe(gulp.dest("inc/js")); // folder for result to end in
});
将 gulp.scr
更改为 gulp.src
。就是错字人生