const path = require('path')
module.exports = (src, dest, bundleName) => () =>
- vfs
- .src('**/*', { base: src, cwd: src })
- .pipe(zip.dest(path.join(dest, `${bundleName}-bundle.zip`)))
+ vfs.src('**/*', { base: src, cwd: src }).pipe(zip.dest(path.join(dest, `${bundleName}-bundle.zip`)))
const buildTask = createTask({
name: 'build',
desc: 'Build and stage the UI assets for bundling',
- call: task.build(srcDir, destDir, process.argv.slice(2).some((name) => name.startsWith('preview'))),
+ call: task.build(
+ srcDir,
+ destDir,
+ process.argv.slice(2).some((name) => name.startsWith('preview'))
+ ),
})
const bundleBuildTask = createTask({
var lastIdx = headings.length - 1
headings.forEach(function (heading, idx) {
var fragment = '#' + heading.id
- if (idx === lastIdx ||
- heading.getBoundingClientRect().top + getStyleValueAsInt(heading, 'paddingTop') > targetPosition) {
+ if (
+ idx === lastIdx ||
+ heading.getBoundingClientRect().top + getStyleValueAsInt(heading, 'paddingTop') > targetPosition
+ ) {
activeFragments.push(fragment)
if (lastActiveFragment.indexOf(fragment) < 0) links[fragment].classList.add('is-active')
} else if (~lastActiveFragment.indexOf(fragment)) {