Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop dependency on deprecated gulp-util #53

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
const path = require('path');
const through2 = require('through2');
const dargs = require('dargs');
const gutil = require('gulp-util');
const fancyLog = require('fancy-log');
const chalk = require('chalk');
const groupBy = require('lodash.groupby');
const PQueue = require('p-queue');
const commandRunner = require('./lib/command-runner');
Expand Down Expand Up @@ -85,7 +86,7 @@ module.exports = function (opts = {}, done = noop) {
return cb();
}
if (skipInstall()) {
log('Skipping install.', 'Run `' + gutil.colors.yellow(formatCommands(toRun)) + '` manually');
log('Skipping install.', 'Run `' + chalk.yellow(formatCommands(toRun)) + '` manually');
return cb();
}
const groupedCommands = groupBy(toRun, 'cmd');
Expand All @@ -103,7 +104,7 @@ module.exports = function (opts = {}, done = noop) {
function logFailure(command) {
return promise => {
return promise.catch(err => {
log(err.message, ', run `' + gutil.colors.yellow(formatCommand(command)) + '` manually');
log(err.message, ', run `' + chalk.yellow(formatCommand(command)) + '` manually');
throw err;
});
};
Expand All @@ -113,7 +114,7 @@ function log(...args) {
if (isTest()) {
return;
}
gutil.log(...args);
fancyLog(...args);
}

function formatCommands(cmds) {
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
},
"homepage": "https://github.com/slushjs/gulp-install",
"dependencies": {
"chalk": "^2.3.0",
"dargs": "^5.1.0",
"gulp-util": "^3.0.7",
"fancy-log": "^1.3.2",
"lodash.groupby": "^4.6.0",
"p-queue": "^1.0.0",
"through2": "^2.0.3",
Expand All @@ -34,6 +35,7 @@
"chai": "^3.2.0",
"mocha": "^3.2.0",
"standard-version": "^4.0.0",
"vinyl": "^2.1.0",
"xo": "^0.18.0"
},
"xo": {
Expand Down
4 changes: 2 additions & 2 deletions test/install-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'use strict';
const path = require('path');
const chai = require('chai');
const gutil = require('gulp-util');
const Vinyl = require('vinyl');
const commandRunner = require('../lib/command-runner');
const install = require('../.');

Expand All @@ -12,7 +12,7 @@ const args = process.argv.slice();

function fixture(file) {
const filepath = path.join(__dirname, file);
return new gutil.File({
return new Vinyl({
path: filepath,
cwd: __dirname,
base: path.join(__dirname, path.dirname(file)),
Expand Down