grunt-contrib-templify
Advanced tools
Comparing version 0.0.1 to 0.0.2
module.exports = { | ||
"mode": "karma-angular", | ||
"prefix": function() { | ||
return "var __templifyTemplates = function($templateCache) {\n"; | ||
return "var __templifyTemplates = function() { beforeEach(inject(function($templateCache) {\n"; | ||
}, | ||
@@ -10,4 +10,4 @@ "generator": function(template) { | ||
"suffix": function() { | ||
return "};\n"; | ||
return "}));};\n"; | ||
} | ||
}; |
{ | ||
"name": "grunt-contrib-templify", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "A simple project for quick and dirty conversion of HTML files to javascript for various cases, particularly unit testing.", | ||
@@ -20,3 +20,6 @@ "main": "index.js", | ||
], | ||
"author": "Alexander Anderson", | ||
"author": { | ||
"name": "Alexander Anderson", | ||
"email": "aetherwalker@refugesystems.net" | ||
}, | ||
"license": "MIT", | ||
@@ -23,0 +26,0 @@ "bugs": { |
@@ -29,2 +29,15 @@ # grunt-contrib-templify | ||
### Functionality | ||
* Karma-Angular | ||
The task creates a function that handles binding a beforeEach clause that adds the templates to the $templateCache. The eqivilent code as an example: | ||
```javascript | ||
beforeEach( inject( function($templateCache) { | ||
$templateCache.put("...", "..."); | ||
$templateCache.put("...", "..."); | ||
// ... | ||
} ) ); | ||
``` | ||
### Options | ||
@@ -106,5 +119,4 @@ | ||
//... | ||
beforeEach(inject(function($templateCache) { | ||
__templifyTemplates($templateCache); | ||
})); | ||
/* Creates a beforeEach clause in Jasmine to bind the templates to the Template cache */ | ||
__templifyTemplates(); | ||
//... | ||
@@ -111,0 +123,0 @@ ``` |
@@ -7,5 +7,6 @@ | ||
beforeEach(inject(function($templateCache) { | ||
__templifyTemplates($templateCache); | ||
})); | ||
// beforeEach(inject(function($templateCache) { | ||
// __templifyTemplates($templateCache); | ||
// })); | ||
__templifyTemplates(); | ||
@@ -12,0 +13,0 @@ describe("Templating", function() { |
16947
286
123