Skip to content

Instantly share code, notes, and snippets.

View emerson-pereira's full-sized avatar

Emerson Pereira emerson-pereira

  • Porto - Portugal
View GitHub Profile
/**
* @desc Compile and execute handlebars and populate dest dir with markup
*/
gulp.task('handlebars', function() {
/**
* @desc File that contains data to be compile and executed by Handlebars
* @type {json}
*/
var handlebarsContext = require('./src/data.json');
// Template (.hbs)
var template = (function () {
var template = null;
$.ajax({
type: 'GET',
dataType: 'html',
async: false,
url: 'templates/template.hbs',
success: function(res) {
template = res;