Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grunt-caveman

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-caveman - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

4

package.json
{
"name": "grunt-caveman",
"description": "Pre-compile Caveman templates.",
"version": "0.1.4",
"version": "0.1.5",
"homepage": "https://github.com/andrewchilds/grunt-caveman",

@@ -18,3 +18,3 @@ "author": {

"dependencies": {
"caveman": "0.1.3",
"caveman": "0.1.4",
"lodash": "2.4.1"

@@ -21,0 +21,0 @@ },

@@ -30,3 +30,3 @@ # grunt-caveman

### Using pre-compiled templates on the client
### Rendering pre-compiled templates on the client-side:

@@ -45,2 +45,6 @@ ```js

src: ['path/to/templates/*.html'],
data: {
foo: [1, 2, 3],
bar: true
},
render: {

@@ -47,0 +51,0 @@ 'indexPage': 'public/index.html',

@@ -23,2 +23,6 @@ /*

src: ['path/to/templates/*.html'],
data: {
foo: [1, 2, 3],
bar: true
},
render: {

@@ -40,3 +44,3 @@ 'indexPage': 'public/index.html',

if (this.data.src && this.data.render) {
exports.compileAndRenderTemplates(grunt, this.data.src, this.data.render);
exports.compileAndRenderTemplates(grunt, this.data.src, this.data.render, this.data.data);
}

@@ -71,3 +75,3 @@ });

exports.compileAndRenderTemplates = function (grunt, src, files) {
exports.compileAndRenderTemplates = function (grunt, src, files, data) {
var path = require('path');

@@ -92,5 +96,5 @@ var Caveman = require('caveman');

_.each(files, function (dest, template) {
grunt.file.write(dest, Caveman.render(template));
grunt.file.write(dest, Caveman.render(template, data || {}));
grunt.log.writeln(template.cyan + ' -> ' + dest.cyan);
});
};
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc