1.1.1 • Published 8 years ago

handlebars-what-partial v1.1.1

Weekly downloads
1
License
ISC
Repository
github
Last release
8 years ago

Handlebars What Partial

Create a json structured file that shows all handlebars partials contained in any given handlebars template file.

Installation

  • Run npm install handlebars-what-partial --save-dev

Basic Setup (using gulp)

var gulp = require('gulp');
var handlebarsWhatPartial = require('handlebars-what-partial');

gulp.task('hanldebars-list', function(){
	return gulp.src('path/to/views')
	       .pipe(handlebarsWhatPartial())
	       .pipe(gulp.dest('path/to/output'));
});

Options

  • filename - Names the output file.

Example

var gulp = require('gulp');
var handlebarsWhatPartial = require('handlebars-what-partial');

var options = {
	filename: 'myFileName'
};

gulp.task('hanldebars-list', function(){
	return gulp.src('path/to/views')
	       .pipe(handlebarsWhatPartial(options))
	       .pipe(gulp.dest('path/to/output'));
});