Files @ 2cdb554623e5
Branch filter:

Location: symposion_app/gulp/tasks/handlebars.js

Christopher Neugebauer
Tuesday & Wednesday work (#30)

* Fixes an incorrect link in dashboard

* Disables the symposion sponsors app

* Adds redirect links for login/logout; adds THEME_CONTACT_EMAIL value

* Re-adds colophon/copyright message.

* Adds AceMarkdownEditor widget

* Tidies up the generated HTML

* Tidies up form snippet behaviour

* Proposals forms now use the markdown editor

* Monkey patches the markdown editor into the speaker form.

* Adds missing field to proposal details

* Fixes #10 — adds a link to random unreviewed proposals

* Minor tweaks
/**
 * Dependencies
 */
const fs = require('fs');
const gulp  = require('gulp');
const handlebars = require('gulp-compile-handlebars');
const path = require('path');
const rename = require('gulp-rename');

/**
 * Module body / Expose
 */
module.exports = (manifestPath, scriptSourceTemplate, staticRoot) => {
  const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
  const handlebarOpts = {
            helpers: {
                assetPath: (path, context) => {
                    return [staticRoot, context.data.root[path]].join('/');
                }
            }
        };
  const outputFile = path.basename(scriptSourceTemplate).replace('.hbs', '.html');
  return gulp.src(scriptSourceTemplate)
      .pipe(handlebars(manifest, handlebarOpts))
      .pipe(rename(outputFile));
};