Skip to content

Commit

Permalink
deps: remove pretemplater
Browse files Browse the repository at this point in the history
  • Loading branch information
shakyShane committed Oct 15, 2015
1 parent e751ac9 commit db49383
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions tasks/_makeDocs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,10 @@ var fs = require("fs");
var doc = "../_doc/yuidoc.json";
var docGen = require("./_docgen");
var opts = require("browser-sync/lib/cli/opts.start.json");
var pretemplater = require("pretemplater");
var marked = require('marked');
var _ = require("lodash");
_.templateSettings.interpolate = /{:([\s\S]+?):}/g;

function getTemplate(name) {

var source = fs.readFileSync("./_src/_tmp/_%s.tmpl.html".replace("%s", name), "utf-8");
var template = pretemplater(source);
return _.template(template);
}

var excluded = [
"use"
];
Expand Down Expand Up @@ -96,29 +88,6 @@ function previewTweaks(item) {
return item;
}

/**
* Build the markup for each item
* @param combined
* @param item
* @returns {*}
*/
function buildMarkup (combined, item) {

item.snippet = getSnippet(item, "api") || false;

if (!item.description) {
item.description = "";
} else {
item.description = marked(item.description);
}

if (item.params) {
item.params = item.params.map(fixDescription);
}

return combined + getTemplate("api")(item);
}

/**
* @param item
* @returns {*}
Expand Down

0 comments on commit db49383

Please sign in to comment.