Skip to content

Commit

Permalink
Fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsauter committed Apr 21, 2020
1 parent 85805f1 commit 310aa2c
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions gulp.d/tasks/build-preview-pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,6 @@ module.exports = (src, previewSrc, previewDest, sink = () => map()) => (done) =>
uiModel.page.contents = Buffer.from(doc.convert())
}
file.extname = '.html'
<<<<<<< HEAD:gulpfile.js/tasks/preview-pages.js
file.contents = Buffer.from(layouts[uiModel.page.layout](uiModel))
next(null, file)
}),
)
.pipe(vfs.dest(previewDest))
.pipe(sink()),
=======
try {
file.contents = Buffer.from(layouts.get(uiModel.page.layout)(uiModel))
next(null, file)
Expand All @@ -66,7 +58,6 @@ module.exports = (src, previewSrc, previewDest, sink = () => map()) => (done) =>
.pipe(vfs.dest(previewDest))
.on('error', (e) => done)
.pipe(sink())
>>>>>>> gitlab/master:gulp.d/tasks/build-preview-pages.js
)

function loadSampleUiModel (src) {
Expand All @@ -78,7 +69,7 @@ function registerPartials (src) {
map((file, enc, next) => {
handlebars.registerPartial(file.stem, file.contents.toString())
next()
}),
})
)
}

Expand All @@ -89,19 +80,13 @@ function registerHelpers (src) {
map((file, enc, next) => {
handlebars.registerHelper(file.stem, requireFromString(file.contents.toString()))
next()
}),
})
)
}

function compileLayouts (src) {
const layouts = new Map()
return vfs.src('layouts/*.hbs', { base: src, cwd: src }).pipe(
<<<<<<< HEAD:gulpfile.js/tasks/preview-pages.js
map((file, enc, next) => {
layouts[file.stem] = handlebars.compile(file.contents.toString(), { preventIndent: true })
next()
}),
=======
map(
(file, enc, next) => {
const srcName = path.join(src, file.relative)
Expand All @@ -113,7 +98,6 @@ function compileLayouts (src) {
done()
}
)
>>>>>>> gitlab/master:gulp.d/tasks/build-preview-pages.js
)
}

Expand Down

0 comments on commit 310aa2c

Please sign in to comment.