diff --git a/index.js b/index.js index d45bffc..6668c06 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,4 @@ -var gutil = require('gulp-util'); +var PluginError = require('plugin-error'); var through = require('through2'); var Handlebars = require('handlebars'); var fs = require('fs'); @@ -114,7 +114,7 @@ function handlebars(data, opts) { } if (file.isStream()) { - this.emit('error', new gutil.PluginError('gulp-compile-handlebars', 'Streaming not supported')); + this.emit('error', new PluginError('gulp-compile-handlebars', 'Streaming not supported')); return cb(); } @@ -131,7 +131,7 @@ function handlebars(data, opts) { var template = hb.compile(fileContents, options.compile); file.contents = new Buffer(template(_data)); } catch (err) { - this.emit('error', new gutil.PluginError('gulp-compile-handlebars', err)); + this.emit('error', new PluginError('gulp-compile-handlebars', err)); } this.push(file); diff --git a/package.json b/package.json index fee9f46..1c752e5 100644 --- a/package.json +++ b/package.json @@ -28,11 +28,12 @@ "rendering" ], "dependencies": { - "gulp-util": "^3.0.3", - "through2": "^0.6.3", - "handlebars": ">=3.0.0" + "handlebars": ">=3.0.0", + "plugin-error": "^0.1.2", + "through2": "^0.6.3" }, "devDependencies": { - "mocha": "*" + "mocha": "*", + "vinyl": "^2.1.0" } } diff --git a/test/test.js b/test/test.js index 0742586..949622e 100644 --- a/test/test.js +++ b/test/test.js @@ -1,6 +1,6 @@ 'use strict'; var assert = require('assert'); -var gutil = require('gulp-util'); +var Vinyl = require('vinyl'); var template = require('../index'); it('should compile Handlebars templates', function (cb) { @@ -19,7 +19,7 @@ it('should compile Handlebars templates', function (cb) { cb(); }); - stream.write(new gutil.File({ + stream.write(new Vinyl({ contents: new Buffer('{{> header}}{{#each people}}