New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gulp-handlebars-render

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-handlebars-render - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

test/index.spec.js

23

package.json
{
"name": "gulp-handlebars-render",
"version": "0.0.0",
"version": "0.0.1",
"description": "Renders handlebars templates",
"main": "index.js",
"scripts": {
"test": "echo \"YOLO\" && exit 0"
"test": "npm run unit && npm run cov",
"unit": "mocha -R spec",
"cov": "mocha -r blanket -R travis-cov"
},

@@ -19,2 +21,11 @@ "repository": {

],
"config": {
"blanket": {
"pattern": "index.js",
"data-cover-never": "node_modules"
},
"travis-cov": {
"threshold": 80
}
},
"author": "Mark Wilkerson <mark@segfalwt.net>",

@@ -30,3 +41,11 @@ "license": "MIT",

"through2": "^0.6.3"
},
"devDependencies": {
"blanket": "^1.1.6",
"chai": "^1.9.2",
"event-stream": "^3.1.7",
"mocha": "^1.21.4",
"travis-cov": "^0.2.5",
"vinyl": "^0.4.3"
}
}

@@ -6,2 +6,42 @@ gulp-handlebars-render [![Build Status](https://travis-ci.org/markhuge/gulp-handlebars-render.svg)](https://travis-ci.org/markhuge/gulp-handlebars-render)

Don't use me yet. Mark is a jerk and is deploying this for personal use before he writes tests.
# Abstract
My usecase is fully rendering hbs templates with data for livereload preview.
# Install
`npm install gulp-handlebars-render --save-dev`
# Usage
The plugin accepts a data object, which it will apply to any handlebars templates that are passed into it.
The output will be a rendered HTML file per template.
```javascript
var gulp = require('gulp'),
connect = require('gulp-connect'),
cache = require('gulp-cached'),
render = require('gulp-handlebars-render');
var content = {
title: "Lorem ipsum dolor sit amet"
author: "Frindle Babbin"
content: "This is a post"
}
gulp.task('connect', function() {
connect.server({
root: 'build/',
livereload: true
});
});
gulp.task('html', function () {
gulp.src('./src/templates/*.hbs')
.pipe(cache('html'))
.pipe(render(content))
.pipe(gulp.dest('build/'))
.pipe(connect.reload());
});
```

Sorry, the diff of this file is not supported yet

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