Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
Upgrade packages, move away from gulp-util.
Browse files Browse the repository at this point in the history
  • Loading branch information
mprobst committed Aug 4, 2018
1 parent 74127c0 commit 10cbb7f
Show file tree
Hide file tree
Showing 3 changed files with 158 additions and 147 deletions.
13 changes: 6 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
var clangFormat = require('clang-format');
var combine = require('stream-combiner2');
var diff = require('gulp-diff');
var fs = require('fs');
var gutil = require('gulp-util');
var PluginError = require('plugin-error');
var log = require('fancy-log');
var path = require('path');
var streamEqual = require('stream-equal');
var through2 = require('through2');


Expand Down Expand Up @@ -67,13 +66,13 @@ function checkFormat(opt_clangOptions, opt_clangFormat, opt_gulpOptions) {
function(done) {
if (filePaths.length) {
var clangFormatBin = path.relative(process.cwd(), actualClangFormat.location);
gutil.log('WARNING: Files are not properly formatted. Please run');
gutil.log(' ' + clangFormatBin + ' -i -style="' + optsStr + '" ' +
log('WARNING: Files are not properly formatted. Please run');
log(' ' + clangFormatBin + ' -i -style="' + optsStr + '" ' +
filePaths.join(' '));
gutil.log(' (using clang-format version ' + actualClangFormat.version + ')');
log(' (using clang-format version ' + actualClangFormat.version + ')');
var level = opt_gulpOptions.fail ? 'error' : 'warning';
pipe.emit(level,
new gutil.PluginError('gulp-clang-format', 'files not formatted'));
new PluginError('gulp-clang-format', 'files not formatted'));
}
done();
}));
Expand Down
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@
],
"license": "Apache-2.0",
"devDependencies": {
"gulp": "^3.8.11"
"gulp": "^3.9.1"
},
"dependencies": {
"clang-format": "^1.0.32",
"fancy-log": "^1.3.2",
"gulp-diff": "^1.0.0",
"gulp-util": "^3.0.4",
"pkginfo": "^0.3.0",
"plugin-error": "^1.0.1",
"stream-combiner2": "^1.1.1",
"stream-equal": "0.1.6",
"through2": "^0.6.3"
"through2": "^2.0.3"
}
}

0 comments on commit 10cbb7f

Please sign in to comment.