Skip to content

Commit

Permalink
Bump dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
SBoudrias committed May 28, 2019
1 parent c35e6a2 commit 201bca6
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 47 deletions.
21 changes: 13 additions & 8 deletions lib/actions/copy-tpl.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

var extend = require('deep-extend');
var ejs = require('ejs');
var isBinaryFile = require('isbinaryfile');
var isBinaryFileSync = require('isbinaryfile').isBinaryFileSync;

function render(contents, filename, context, tplSettings) {
let result;

const contentsBuffer = Buffer.from(contents, 'binary');
if (isBinaryFile.sync(contentsBuffer, contentsBuffer.length)) {
if (isBinaryFileSync(contentsBuffer, contentsBuffer.length)) {
result = contentsBuffer;
} else {
result = ejs.render(
Expand All @@ -26,10 +26,15 @@ module.exports = function (from, to, context, tplSettings, options) {
context = context || {};
tplSettings = tplSettings || {};

this.copy(from, to, extend(options || {}, {
process: function (contents, filename) {
return render(contents, filename, context, tplSettings);
}
}),
context, tplSettings);
this.copy(
from,
to,
extend(options || {}, {
process: function (contents, filename) {
return render(contents, filename, context, tplSettings);
}
}),
context,
tplSettings
);
};
60 changes: 23 additions & 37 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
"ejs": "^2.6.1",
"glob": "^7.1.4",
"globby": "^9.2.0",
"isbinaryfile": "^3.0.3",
"isbinaryfile": "^4.0.0",
"mkdirp": "^0.5.0",
"multimatch": "^3.0.0",
"multimatch": "^4.0.0",
"rimraf": "^2.6.3",
"through2": "^3.0.1",
"vinyl": "^2.2.0"
Expand Down

0 comments on commit 201bca6

Please sign in to comment.