grunt-bake
Advanced tools
Comparing version 0.3.14 to 0.3.15
@@ -236,2 +236,22 @@ /* | ||
} | ||
}, | ||
function_content_bake: { | ||
options: { | ||
content: function() { | ||
var data = grunt.file.readJSON( "test/fixtures/content.json" ); | ||
data.rooms = data.rooms.map( function( room ) { | ||
room.volume = room.width * room.depth * room.height; | ||
return room; | ||
} ); | ||
return data; | ||
} | ||
}, | ||
files: { | ||
"tmp/function_content_bake.html": "test/fixtures/function_content_bake.html" | ||
} | ||
} | ||
@@ -238,0 +258,0 @@ } |
{ | ||
"name": "grunt-bake", | ||
"description": "Bake external includes into files to create static pages with no server-side compilation time", | ||
"version": "0.3.14", | ||
"version": "0.3.15", | ||
"homepage": "https://github.com/MathiasPaumgarten/grunt-bake", | ||
@@ -37,9 +37,9 @@ "author": { | ||
"grunt-contrib-clean": "~0.4.0", | ||
"grunt-contrib-nodeunit": "~0.1.2", | ||
"grunt-contrib-nodeunit": "^0.4.1", | ||
"grunt-contrib-watch": "~0.4.3", | ||
"grunt-jsonlint": "~1.0.1", | ||
"grunt": "~0.4.0" | ||
"grunt": "~0.4.5" | ||
}, | ||
"peerDependencies": { | ||
"grunt": "~0.4.0" | ||
"grunt": "~0.4.5" | ||
}, | ||
@@ -46,0 +46,0 @@ "keywords": [ |
@@ -73,6 +73,6 @@ # grunt-bake [![Build Status](https://travis-ci.org/MathiasPaumgarten/grunt-bake.png?branch=master)](https://travis-ci.org/MathiasPaumgarten/grunt-bake) | ||
#### options.content | ||
Type: `String` or `Object` | ||
Type: `String` or `Object` or `Function` | ||
Default value: `null` | ||
A string value that determines the location of the JSON file that is used to fill the place holders. If a `Object` is specified it will be used as content. | ||
A string value that determines the location of the JSON file that is used to fill the place holders. If a `Object` is specified it will be used as content. If a `Function` is specified its return (should be JSON) will be used as content. | ||
@@ -79,0 +79,0 @@ #### options.section |
@@ -112,3 +112,3 @@ /* | ||
if ( value === undefined || value === false || string === 'false' ) { | ||
if ( value === undefined || value === false || string === "false" ) { | ||
return true; | ||
@@ -398,2 +398,4 @@ } | ||
values = grunt.file.readJSON( options.content ); | ||
} else if ( mout.lang.isFunction( options.content ) ) { | ||
values = options.content(); | ||
} else { | ||
@@ -400,0 +402,0 @@ values = options.content ? options.content : {}; |
@@ -26,3 +26,4 @@ "use strict"; | ||
"tmp/render_bake.html": "test/expected/render_bake.html", | ||
"tmp/html_include_bake.html": "test/expected/html_include_bake.html" | ||
"tmp/html_include_bake.html": "test/expected/html_include_bake.html", | ||
"tmp/function_content_bake.html": "test/expected/function_content_bake.html" | ||
}; | ||
@@ -29,0 +30,0 @@ |
@@ -21,3 +21,16 @@ { | ||
} | ||
} | ||
}, | ||
"rooms": [ | ||
{ | ||
"width": "9", | ||
"depth": "5", | ||
"height": "2" | ||
}, | ||
{ | ||
"width": "4", | ||
"depth": "2", | ||
"height": "2.4" | ||
} | ||
] | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
49
564
35810