This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: {{ include [partial] }} | |
module.exports.include = include = (template, options) -> | |
partial = Handlebars.partials[template] | |
if (typeof partial is "string") | |
partial = Handlebars.compile(partial) | |
Handlebars.partials[template] = partial | |
return Utils.safeString('Partial **' + template + '** not found.') unless partial | |
context = _.extend({}, this, options.hash) | |
Utils.safeString partial(context) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
assembleOptions = options #this is assuming these helpers are in the register function that takes in an options object from assemble | |
minimatch = require 'minimatch' | |
matchPartials = (src, search) -> | |
files = grunt.files.expand src | |
partials = files.filter(minimatch.filter(search)) | |
partials |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet; | |
var mountFolder = function (connect, dir) { | |
return connect.static(require('path').resolve(dir)); | |
}; | |
module.exports = function (grunt) { | |
// load all grunt tasks | |
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function boom(){ | |
if (!window.Showdown){ | |
var scr = document.createElement('script'); | |
scr.onload = boom; | |
scr.src = 'https://raw.github.com/github/github-flavored-markdown/gh-pages/scripts/showdown.js'; | |
document.body.appendChild(scr); | |
return; | |
} |