don't need to wrap pack stream in Promise
authorDan Allen <dan@opendevise.com>
Mon, 12 Feb 2018 10:55:38 +0000 (03:55 -0700)
committerDan Allen <dan@opendevise.com>
Tue, 13 Feb 2018 03:38:51 +0000 (20:38 -0700)
tasks/pack.js

index 718b2c8..2a9ab90 100644 (file)
@@ -4,11 +4,7 @@ const vfs = require('vinyl-fs')
 const zip = require('gulp-vinyl-zip')
 
 module.exports = async (src, dest, bundleName) =>
-  new Promise((resolve, reject) =>
-    vfs
-      .src('**/*', { base: src, cwd: src })
-      .pipe(zip.zip(`${bundleName}-bundle.zip`))
-      .pipe(vfs.dest(dest))
-      .on('error', reject)
-      .on('end', resolve)
-  )
+  vfs
+    .src('**/*', { base: src, cwd: src })
+    .pipe(zip.zip(`${bundleName}-bundle.zip`))
+    .pipe(vfs.dest(dest))