gulp-pug
Advanced tools
Comparing version 3.1.0 to 3.2.0
12
index.js
@@ -13,10 +13,8 @@ 'use strict'; | ||
opts.data = objectAssign(opts.data || {}, opts.locals || {}); | ||
return through.obj(function compilePug(file, enc, cb) { | ||
var data = objectAssign({}, opts.data, file.data || {}); | ||
opts.filename = file.path; | ||
opts.data = objectAssign(opts.data || {}, opts.locals || {}); | ||
if (file.data) { | ||
objectAssign(opts.data, file.data); | ||
} | ||
file.path = ext(file.path, opts.client ? '.js' : '.html'); | ||
@@ -35,3 +33,3 @@ | ||
} else { | ||
compiled = pug.compile(contents, opts)(opts.data); | ||
compiled = pug.compile(contents, opts)(data); | ||
} | ||
@@ -38,0 +36,0 @@ file.contents = new Buffer(compiled); |
{ | ||
"name": "gulp-pug", | ||
"version": "3.1.0", | ||
"version": "3.2.0", | ||
"description": "Gulp plugin for compiling Pug templates", | ||
@@ -12,3 +12,3 @@ "keywords": [ | ||
], | ||
"repository": "https://github.com/jamen/gulp-pug.git", | ||
"repository": "https://github.com/pugjs/gulp-pug.git", | ||
"dependencies": { | ||
@@ -15,0 +15,0 @@ "gulp-util": "^3.0.2", |
@@ -40,5 +40,5 @@ # gulp-pug [![Build Status][status-img]][status] ![Dependencies][deps] ![Downloads][downloads] | ||
[status]: https://travis-ci.org/jamen/gulp-pug | ||
[status-img]: https://travis-ci.org/jamen/gulp-pug.png?branch=master | ||
[deps]: https://david-dm.org/jamen/gulp-pug.svg | ||
[status]: https://travis-ci.org/pugjs/gulp-pug | ||
[status-img]: https://travis-ci.org/pugjs/gulp-pug.png?branch=master | ||
[deps]: https://david-dm.org/pugjs/gulp-pug.svg | ||
[downloads]: https://img.shields.io/npm/dm/gulp-pug.svg | ||
@@ -45,0 +45,0 @@ [pug]: http://github.com/pugjs/pug |
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
5159
34