Commit 8e09c1d1 authored by Dan Allen's avatar Dan Allen
Browse files

drop through2 dependency

use native stream.Transform instead
parent 0570838a
'use strict'
const log = require('fancy-log')
const { obj: map } = require('through2')
const PluginError = require('plugin-error')
const prettierEslint = require('prettier-eslint')
const { Transform } = require('stream')
const map = (transform) => new Transform({ objectMode: true, transform })
module.exports = () => {
const report = { changed: 0, unchanged: 0 }
......
......@@ -9,11 +9,12 @@ Error.call = (self, ...args) => {
const asciidoctor = require('asciidoctor.js')()
const fs = require('fs-extra')
const handlebars = require('handlebars')
const { obj: map } = require('through2')
const merge = require('merge-stream')
const ospath = require('path')
const path = ospath.posix
const requireFromString = require('require-from-string')
const { Transform } = require('stream')
const map = (transform = () => {}, flush = undefined) => new Transform({ objectMode: true, transform, flush })
const vfs = require('vinyl-fs')
const yaml = require('js-yaml')
......@@ -62,7 +63,7 @@ module.exports = (src, previewSrc, previewDest, sink = () => map()) => (done) =>
})
)
.pipe(vfs.dest(previewDest))
.on('error', (e) => done)
//.on('error', done)
.pipe(sink())
)
......
......@@ -7,7 +7,6 @@ const concat = require('gulp-concat')
const cssnano = require('cssnano')
const fs = require('fs-extra')
const imagemin = require('gulp-imagemin')
const { obj: map } = require('through2')
const merge = require('merge-stream')
const ospath = require('path')
const path = ospath.posix
......@@ -16,6 +15,8 @@ const postcssCalc = require('postcss-calc')
const postcssImport = require('postcss-import')
const postcssUrl = require('postcss-url')
const postcssVar = require('postcss-custom-properties')
const { Transform } = require('stream')
const map = (transform) => new Transform({ objectMode: true, transform })
const uglify = require('gulp-uglify')
const vfs = require('vinyl-fs')
......
'use strict'
const fs = require('fs-extra')
const { obj: map } = require('through2')
const { Transform } = require('stream')
const map = (transform) => new Transform({ objectMode: true, transform })
const vfs = require('vinyl-fs')
module.exports = (files) => () =>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment