Skip to content

Commit

Permalink
Drop dependency on deprecated gulp-util
Browse files Browse the repository at this point in the history
Closes #54
  • Loading branch information
TheDancingCode authored and tracker1 committed Jan 17, 2018
1 parent e1a2466 commit decbdc0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions index.js
Expand Up @@ -8,7 +8,7 @@
var Concat = require('concat-with-sourcemaps');
var extend = require('object-assign');
var through = require('through2');
var gutil = require('gulp-util');
var lodashTemplate = require('lodash.template');
var stream = require('stream');
var path = require('path');
var fs = require('fs');
Expand All @@ -28,7 +28,7 @@ module.exports = function (headerText, data) {

// format template
var filename = path.basename(file.path);
var template = data === false ? headerText : gutil.template(headerText, extend({ file: file, filename: filename }, data));
var template = data === false ? headerText : lodashTemplate(headerText)(extend({ file: file, filename: filename }, data));

if (file && typeof file === 'string') {
this.push(template + file);
Expand Down
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -44,10 +44,10 @@
"url": "https://github.com/tracker1/gulp-header/issues"
},
"dependencies": {
"gulp-util": "*",
"concat-with-sourcemaps": "*",
"lodash.template": "^4.4.0",
"object-assign": "*",
"through2": "^2.0.0",
"concat-with-sourcemaps": "*"
"through2": "^2.0.0"
},
"devDependencies": {
"event-stream": "^3.1.7",
Expand Down
1 change: 0 additions & 1 deletion test/main.js
Expand Up @@ -4,7 +4,6 @@

var header = require('../');
var should = require('should');
var gutil = require('gulp-util');
var fs = require('fs');
var path = require('path');
var es = require('event-stream');
Expand Down

0 comments on commit decbdc0

Please sign in to comment.