Skip to content

Instantly share code, notes, and snippets.

@tommcfarlin tommcfarlin/00-public.js Secret
Last active Sep 28, 2017

What would you like to do?
[JavaScript] The Perfect JavaScript Templating Enging
(function($) {
'use strict';
var _getShop = function() {
var shopHtml =
"<h1>" +
"{{title}}" +
return shopHtml;
$(function() {
var template = new tplite.Template();
var buffer = new tplite.StringBuffer();
var compile = template(_getShop());
title: 'Hello World!'
}, buffer);
"dependencies": {
"tplite": "1.0.3"
$this->pluginUrl . 'node_modules/tplite/dist/tplite-all.min.js'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.