最近GULPを使用してビルドを行っています。しかし、私は "スクリプト"のクリーニングを実行しようとしている間、壁にぶつかってきました。GULP tap.js - プロパティを読み取ることができません
エラー
D:\GitHub\ASGARD\baseThemeV2\src>gulp default
[23:13:03] Using gulpfile D:\GitHub\ASGARD\baseThemeV2\src\gulpfile.js
[23:13:03] Starting 'lint:js'...
[23:13:03] Starting 'build:plugins'...
[23:13:03] Starting 'build:js'...
[23:13:03] Starting 'build:less'...
[23:13:03] Starting 'build:images'...
[23:13:03] Starting 'build:svgs'...
[23:13:03] Starting 'build:fonts'...
[23:13:03] Starting 'build:favicon'...
[23:13:03] Finished 'build:favicon' after 2.19 ms
[23:13:03] Finished 'build:plugins' after 78 ms
D:\GitHub\ASGARD\baseThemeV2\src\node_modules\gulp-tap\lib\tap.js:60
if (obj instanceof baseStream && !obj._readableState.ended) {
^
TypeError: Cannot read property 'ended' of undefined
at DestroyableTransform.modifyFile (D:\GitHub\ASGARD\baseThemeV2\src\node_modules\gulp-tap\lib\tap.js:60:57)
at DestroyableTransform.Transform._read (D:\GitHub\ASGARD\baseThemeV2\src\node_modules\through2\node_modules\readable-stream\lib\_stream_transform.js:182:10)
at DestroyableTransform.Transform._write (D:\GitHub\ASGARD\baseThemeV2\src\node_modules\through2\node_modules\readable-stream\lib\_stream_transform.js:170:83)
at doWrite (D:\GitHub\ASGARD\baseThemeV2\src\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:406:64)
at writeOrBuffer (D:\GitHub\ASGARD\baseThemeV2\src\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:395:5)
at DestroyableTransform.Writable.write (D:\GitHub\ASGARD\baseThemeV2\src\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:322:11)
at DestroyableTransform.ondata (D:\GitHub\ASGARD\baseThemeV2\src\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:612:20)
at emitOne (events.js:96:13)
at DestroyableTransform.emit (events.js:188:7)
at addChunk (D:\GitHub\ASGARD\baseThemeV2\src\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:284:12)
D:\GitHub\ASGARD\baseThemeV2\src>
ザ・ガルプ "コマンド" 私は 私はエラーがあると信じている使用しています ".pipe(タップ(機能(ファイル、T){" - しかし、私は「ない」これを使用する方法がわからない
// Lint, minify, and concatenate scripts
gulp.task('build:js', function() {
var jsTasks = lazypipe()
.pipe(header, banner.full, { package : package })
.pipe(gulp.dest, paths.scripts.output)
.pipe(rename, { suffix: '.min' })
.pipe(uglify)
.pipe(header, banner.min, { package : package })
.pipe(gulp.dest, paths.scripts.output);
return gulp.src(paths.scripts.input)
.pipe(plumber())
.pipe(tap(function (file, t) {
if (file.isDirectory()) {
var name = file.relative + '.js';
return gulp.src(file.path + '/*.js')
.pipe(concat(name))
.pipe(jsTasks());
}
}))
.pipe(jsTasks());
});