grunt-bake
Advanced tools
Comparing version 0.3.12 to 0.3.13
@@ -224,2 +224,14 @@ /* | ||
} | ||
}, | ||
html_include_bake: { | ||
options: { | ||
content: { | ||
foo: "<span>Foo</span>" | ||
} | ||
}, | ||
files: { | ||
"tmp/html_include_bake.html": "test/fixtures/html_include_bake.html" | ||
} | ||
} | ||
@@ -226,0 +238,0 @@ } |
{ | ||
"name": "grunt-bake", | ||
"description": "Bake external includes into files to create static pages with no server-side compilation time", | ||
"version": "0.3.12", | ||
"version": "0.3.13", | ||
"homepage": "https://github.com/MathiasPaumgarten/grunt-bake", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -131,3 +131,3 @@ # grunt-bake [![Build Status](https://travis-ci.org/MathiasPaumgarten/grunt-bake.png?branch=master)](https://travis-ci.org/MathiasPaumgarten/grunt-bake) | ||
A Function which is used to process the template before putting it into the file. If `process` is defined as `null` or `false` the includes won't be processed at all. | ||
The default process uses two curly braces as marker, such as `{{json.value.name}}`. However the the parse regex is costumizable using `options.parsePattern`. | ||
The default process uses two curly braces as marker, such as `{{json.value.name}}`. However the parse regex is costumizable using `options.parsePattern`. | ||
@@ -311,3 +311,3 @@ The function gets passed two arguments: | ||
Additionally the the `_if` statement also works with inlining the bake content. | ||
Additionally the `_if` statement also works with inlining the bake content. | ||
@@ -484,4 +484,4 @@ ```html | ||
#### Costum process | ||
This example shows the use of a costum process funtion. | ||
#### Custom process | ||
This example shows the use of a custom process function. | ||
@@ -511,5 +511,5 @@ ```js | ||
### Continues development | ||
### Continuous development | ||
For ease of development just add the `bake` task to your watch list. The static page will be baked everytime you change the template. | ||
For ease of development just add the `bake` task to your watch list. The static page will be baked every time you change the template. | ||
@@ -523,2 +523,2 @@ ```javascript | ||
} | ||
``` | ||
``` |
@@ -57,3 +57,3 @@ /* | ||
var regex = /(\n?)([ |\t]*)<!--\(\s?bake\s+([\w\/.\-]+)\s?([^>]*)\)-->/g; | ||
var regex = /(\n?)([ |\t]*)<!--\(\s?bake\s+([\w\/.\-]+)\s?([^]*?)\)-->/g; | ||
var regexInline = /(?:[ |\t]*<!--\(\s?bake-start\s+([^>]*)\)-->)\n?([\s\S]+?)(?:[ |\t]*<!--\(\s?bake-end\s?\)-->)/g; | ||
@@ -60,0 +60,0 @@ |
@@ -25,3 +25,4 @@ "use strict"; | ||
"tmp/section_bake.html": "test/expected/section_bake.html", | ||
"tmp/render_bake.html": "test/expected/render_bake.html" | ||
"tmp/render_bake.html": "test/expected/render_bake.html", | ||
"tmp/html_include_bake.html": "test/expected/html_include_bake.html" | ||
}; | ||
@@ -28,0 +29,0 @@ |
33656
47
516
520