Skip to content

Commit

Permalink
refactor: remove gulp-util dependency
Browse files Browse the repository at this point in the history
Since gulp-util is now deprecated and will be removed in Gulp 4, so this
commit removes gulp-util and replaces it's utils with alternative
packages.

Fixes #64
  • Loading branch information
rogeriopvl committed Dec 30, 2017
1 parent fb3a5da commit e91a8b4
Show file tree
Hide file tree
Showing 4 changed files with 163 additions and 479 deletions.
10 changes: 5 additions & 5 deletions index.js
@@ -1,11 +1,11 @@
'use strict';

var mapStream = require('map-stream');
var gutil = require('gulp-util');
var c = gutil.colors;
var colors = require('ansi-colors');
var jsonlint = require('jsonlint');
var through = require('through2');
var PluginError = require('gulp-util').PluginError;
var PluginError = require('plugin-error')
var log = require('fancy-log')

var formatOutput = function (msg) {
var output = {};
Expand Down Expand Up @@ -36,8 +36,8 @@ var jsonLintPlugin = function (options) {
};

var defaultReporter = function (file) {
gutil.log(c.yellow('Error on file ') + c.magenta(file.path));
gutil.log(c.red(file.jsonlint.message));
log(colors.yellow('Error on file ') + colors.magenta(file.path));
log(colors.red(file.jsonlint.message));
};

jsonLintPlugin.reporter = function (customReporter) {
Expand Down

0 comments on commit e91a8b4

Please sign in to comment.