Comparing version 0.2.2 to 0.3.0
@@ -16,2 +16,4 @@ 'use strict'; | ||
var _path = require('path'); | ||
var _gulpUtil = require('gulp-util'); | ||
@@ -25,3 +27,2 @@ | ||
return _through2.default.obj(function stream(original, enc, callback) { | ||
var file = original.clone(); | ||
var error = null; | ||
@@ -31,3 +32,3 @@ var contents = null; | ||
if (file.isBuffer()) { | ||
contents = _pug2.default.compile(file.contents.toString(), opts)(opts.locals); | ||
contents = _pug2.default.compile(original.contents.toString(), opts)(opts.locals); | ||
} else { | ||
@@ -37,3 +38,6 @@ error = new _gulpUtil.PluginError('gulp-pug', 'Unsupported file content'); | ||
file.contents = new Buffer(contents); | ||
var file = original.clone({ | ||
contents: new Buffer(contents), | ||
extname: '.html' | ||
}); | ||
callback(error, file); | ||
@@ -40,0 +44,0 @@ }); |
{ | ||
"name": "gulp-pug", | ||
"version": "0.2.2", | ||
"version": "0.3.0", | ||
"description": "Gulp plugin for PugJS", | ||
@@ -5,0 +5,0 @@ "main": "out/index.js", |
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
3724
29