From: Dan Allen Date: Sat, 11 Apr 2020 09:18:11 +0000 (-0600) Subject: announce path of bundle in the form of the --ui-bundle-url option X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=0538ff99d8e43b78502a19eecf8f3e8e213956bf;p=working%2Feg-antora.git announce path of bundle in the form of the --ui-bundle-url option --- diff --git a/gulp.d/tasks/pack.js b/gulp.d/tasks/pack.js index a2f1957..a792e72 100644 --- a/gulp.d/tasks/pack.js +++ b/gulp.d/tasks/pack.js @@ -4,5 +4,8 @@ const vfs = require('vinyl-fs') const zip = require('gulp-vinyl-zip') const path = require('path') -module.exports = (src, dest, bundleName) => () => - vfs.src('**/*', { base: src, cwd: src }).pipe(zip.dest(path.join(dest, `${bundleName}-bundle.zip`))) +module.exports = (src, dest, bundleName, onFinish) => () => + vfs + .src('**/*', { base: src, cwd: src }) + .pipe(zip.dest(path.join(dest, `${bundleName}-bundle.zip`))) + .on('finish', () => onFinish && onFinish(path.resolve(dest, `${bundleName}-bundle.zip`))) diff --git a/gulpfile.js b/gulpfile.js index adce4c4..395c46e 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -3,6 +3,7 @@ const { parallel, series, watch } = require('gulp') const createTask = require('./gulp.d/lib/create-task') const exportTasks = require('./gulp.d/lib/export-tasks') +const log = require('fancy-log') const bundleName = 'ui' const buildDir = 'build' @@ -68,7 +69,12 @@ const bundleBuildTask = createTask({ const bundlePackTask = createTask({ name: 'bundle:pack', desc: 'Create a bundle of the staged UI assets for publishing', - call: task.pack(destDir, buildDir, bundleName), + call: task.pack( + destDir, + buildDir, + bundleName, + (bundlePath) => !process.env.CI && log(`Antora option: --ui-bundle-url ${bundlePath}`) + ), }) const bundleTask = createTask({