index.js
function tpl_apply_with_register_helper(Handlebars, template_path, data_obj, dest_file_path) {
	var rs = fs.createReadStream(template_path, {bufferSize: 11}); 
	var bufferHelper = new BufferHelper();

	rs.on("data", function (trunk){
			bufferHelper.concat(trunk);
	});

	rs.on("end", function () {
		var source = bufferHelper.toBuffer().toString('utf8');
		var template = Handlebars.compile(source);
	
    // log(template);
		
		var content = template(data_obj);

		fs.writeFile(dest_file_path, content , function (err) {
		  if (err) throw err;
		  log('It\'s saved!');
		});

	});
}
function tpl_apply_with_register_helper(Handlebars, template_path, data_obj, dest_file_path) {
	var rs = fs.createReadStream(template_path, {bufferSize: 11}); 
	var bufferHelper = new BufferHelper();

	rs.on("data", function (trunk){
			bufferHelper.concat(trunk);
	});

	rs.on("end", function () {
		var source = bufferHelper.toBuffer().toString('utf8');
		var template = Handlebars.compile(source);
	
    // log(template);
		
		var content = template(data_obj);

		fs.writeFile(dest_file_path, content , function (err) {
		  if (err) throw err;
		  log('It\'s saved!');
		});

	});
}
function tpl_apply_with_register_helper ( Handlebars , template_path , data_obj , dest_file_path ) { var rs = fs . createReadStream ( template_path , { bufferSize : 11 } ) ; var bufferHelper = new BufferHelper ( ) ; rs . on ( "data" , function ( trunk ) { bufferHelper . concat ( trunk ) ; } ) ; rs . on ( "end" , function ( ) { var source = bufferHelper . toBuffer ( ) . toString ( 'utf8' ) ; var template = Handlebars . compile ( source ) ; // log(template); var content = template ( data_obj ) ; fs . writeFile ( dest_file_path , content , function ( err ) { if ( err ) throw err ; log ( 'It\'s saved!' ) ; } ) ; } ) ; }
Custom with helpers
Custom with helpers