gulp-html2pug
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -28,2 +28,4 @@ 'use strict'; | ||
function gulpHtml2pug() { | ||
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
// creating a stream through which each file will pass | ||
@@ -36,6 +38,6 @@ return _through2.default.obj(function (file, enc, cb) { | ||
(0, _vinylContentsTostring2.default)(file, enc).then(function (html) { | ||
return (0, _html2pug2.default)(html); | ||
return (0, _html2pug2.default)(html, options); | ||
}).then(function (pug) { | ||
if (file.isBuffer()) { | ||
newFile.contents = new Buffer(pug); | ||
newFile.contents = Buffer.from(pug); | ||
} else if (file.isStream()) { | ||
@@ -42,0 +44,0 @@ // start the transformation |
{ | ||
"name": "gulp-html2pug", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Gulp plugin to convert html files to pug", | ||
@@ -9,5 +9,5 @@ "main": "dist/index.js", | ||
"build": "gulp build", | ||
"cover": "istanbul cover --report text --report html node_modules/mocha/bin/_mocha", | ||
"coveralls": "npm run cover -- --report lcovonly && cat ./coverage/lcov.info | ./node_modules/.bin/coveralls && rm -rf ./coverage", | ||
"prepublish": "npm run build" | ||
"cover": "nyc npm test", | ||
"coveralls": "npm run cover && nyc report --reporter=text-lcov | coveralls", | ||
"prepare": "npm run build" | ||
}, | ||
@@ -35,24 +35,27 @@ "files": [ | ||
"dependencies": { | ||
"gulp-util": "^3.0.7", | ||
"gulp-util": "^3.0.8", | ||
"html2pug": "^2.0.1", | ||
"through2": "^2.0.1", | ||
"through2": "^2.0.3", | ||
"vinyl-contents-tostring": "1.0.0" | ||
}, | ||
"devDependencies": { | ||
"babel-core": "^6.13.2", | ||
"babel-preset-es2015": "^6.13.2", | ||
"chai": "^3.5.0", | ||
"coveralls": "^2.11.12", | ||
"eslint": "^3.3.1", | ||
"eslint-config-airbnb-base": "^5.0.2", | ||
"eslint-plugin-import": "^1.13.0", | ||
"babel-plugin-istanbul": "^4.1.4", | ||
"babel-preset-es2015": "^6.24.1", | ||
"babel-register": "^6.26.0", | ||
"chai": "^4.1.2", | ||
"coveralls": "^2.13.1", | ||
"eslint-config-airbnb-base": "^12.0.0", | ||
"eslint-plugin-import": "^2.7.0", | ||
"event-stream": "^3.3.4", | ||
"gulp": "^3.9.1", | ||
"gulp-babel": "^6.1.2", | ||
"gulp-eslint": "^3.0.1", | ||
"gulp-mocha": "^3.0.1", | ||
"istanbul": "^1.1.0-alpha.1", | ||
"mocha": "^3.0.2", | ||
"gulp-babel": "^7.0.0", | ||
"gulp-eslint": "^4.0.0", | ||
"gulp-mocha": "^4.3.1", | ||
"nyc": "^11.2.1", | ||
"vinyl": "^1.2.0" | ||
}, | ||
"nyc": { | ||
"sourceMap": false, | ||
"instrument": false | ||
} | ||
} |
@@ -28,3 +28,3 @@ # gulp-html2pug | ||
return gulp.src('index.html') | ||
.pipe(html2pug()) | ||
.pipe(html2pug(/* options for html2pug such as { fragment: true } */)) | ||
.pipe(gulp.dest('pug')); | ||
@@ -31,0 +31,0 @@ }); |
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
5911
14
42
Updatedgulp-util@^3.0.8
Updatedthrough2@^2.0.3