Files
unordered-ui-bundle/gulp.d/tasks/remove.js
Dan Allen 8e09c1d17f drop through2 dependency
use native stream.Transform instead
2020-11-06 14:50:11 -07:00

10 lines
324 B
JavaScript

'use strict'
const fs = require('fs-extra')
const { Transform } = require('stream')
const map = (transform) => new Transform({ objectMode: true, transform })
const vfs = require('vinyl-fs')
module.exports = (files) => () =>
vfs.src(files, { allowEmpty: true }).pipe(map((file, enc, next) => fs.remove(file.path, next)))