partially revert e8c7b37

This commit is contained in:
Tyler Kellen 2012-09-11 06:56:17 -05:00
parent e8c7b372e8
commit 0191a1556c
2 changed files with 4 additions and 3 deletions

View File

@ -1,7 +1,7 @@
{ {
"name": "grunt-contrib-jst", "name": "grunt-contrib-jst",
"description": "Precompile Handlebars templates to JST file.", "description": "Precompile Handlebars templates to JST file.",
"version": "0.2.0", "version": "0.2.1",
"homepage": "https://github.com/gruntjs/grunt-contrib-jst", "homepage": "https://github.com/gruntjs/grunt-contrib-jst",
"author": { "author": {
"name": "Tim Branyen", "name": "Tim Branyen",
@ -38,4 +38,4 @@
"keywords": [ "keywords": [
"gruntplugin" "gruntplugin"
] ]
} }

View File

@ -10,6 +10,8 @@
module.exports = function(grunt) { module.exports = function(grunt) {
"use strict"; "use strict";
var _ = require("underscore");
var jst = function(source, filepath, namespace, templateSettings) { var jst = function(source, filepath, namespace, templateSettings) {
try { try {
return namespace + "['" + filepath + "'] = " + _.template(source, false, templateSettings).source + ";"; return namespace + "['" + filepath + "'] = " + _.template(source, false, templateSettings).source + ";";
@ -21,7 +23,6 @@ module.exports = function(grunt) {
grunt.registerMultiTask("jst", "Compile underscore templates to JST file", function() { grunt.registerMultiTask("jst", "Compile underscore templates to JST file", function() {
var _ = require("underscore");
var helpers = require("grunt-contrib-lib").init(grunt); var helpers = require("grunt-contrib-lib").init(grunt);
var options = helpers.options(this, {namespace: "JST", templateSettings: {}}); var options = helpers.options(this, {namespace: "JST", templateSettings: {}});