Skip to content

Commit

Permalink
Fix: Chalk → Kleur 🦄 (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeed authored and sapegin committed Jul 11, 2018
1 parent 2c52469 commit 8b62d83
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
16 changes: 8 additions & 8 deletions bin/mrm.js
Expand Up @@ -3,7 +3,7 @@

const path = require('path');
const minimist = require('minimist');
const chalk = require('chalk');
const kleur = require('kleur');
const longest = require('longest');
const isDirectory = require('is-directory');
const userHome = require('user-home');
Expand Down Expand Up @@ -147,9 +147,9 @@ Note that when a preset is specified no default search locations are used.`
function commandHelp() {
console.log(
[
chalk.underline('Usage'),
kleur.underline('Usage'),
getUsage(),
chalk.underline('Available tasks'),
kleur.underline('Available tasks'),
getTasksList(options),
].join('\n\n')
);
Expand All @@ -161,9 +161,9 @@ function getUsage() {
return EXAMPLES.map(([command, options, description]) =>
[
' ',
chalk.bold(binaryName),
chalk.cyan(command),
chalk.yellow(options),
kleur.bold(binaryName),
kleur.cyan(command),
kleur.yellow(options),
padEnd('', commandsWidth - (command + options).length),
description && `# ${description}`,
].join(' ')
Expand All @@ -178,13 +178,13 @@ function getTasksList() {
return names
.map(name => {
const description = Array.isArray(tasks[name]) ? `Runs ${listify(tasks[name])}` : tasks[name];
return ' ' + chalk.cyan(padEnd(name, nameColWidth)) + ' ' + description;
return ' ' + kleur.cyan(padEnd(name, nameColWidth)) + ' ' + description;
})
.join('\n');
}

function printError(message) {
console.log();
console.error(chalk.bold.red(message));
console.error(kleur.bold.red(message));
console.log();
}
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -28,10 +28,10 @@
"src"
],
"dependencies": {
"chalk": "^2.4.1",
"git-username": "^1.0.0",
"glob": "^7.1.2",
"is-directory": "^0.3.1",
"kleur": "^1.0.0",
"listify": "^1.0.0",
"lodash": "^4.17.10",
"longest": "^2.0.1",
Expand Down
6 changes: 3 additions & 3 deletions src/index.js
Expand Up @@ -3,7 +3,7 @@
const fs = require('fs');
const path = require('path');
const glob = require('glob');
const chalk = require('chalk');
const kleur = require('kleur');
const requireg = require('requireg');
const { get, forEach } = require('lodash');
const { MrmUnknownTask, MrmUnknownAlias, MrmUndefinedOption } = require('./errors');
Expand Down Expand Up @@ -98,7 +98,7 @@ function runAlias(aliasName, directories, options, argv) {
return;
}

console.log(chalk.yellow(`Running alias ${aliasName}...`));
console.log(kleur.yellow(`Running alias ${aliasName}...`));

promiseSeries(tasks, name => {
return runTask(name, directories, options, argv);
Expand Down Expand Up @@ -130,7 +130,7 @@ function runTask(taskName, directories, options, argv) {
return;
}

console.log(chalk.cyan(`Running ${taskName}...`));
console.log(kleur.cyan(`Running ${taskName}...`));

const module = require(modulePath);
Promise.resolve(module(getConfigGetter(options), argv))
Expand Down

0 comments on commit 8b62d83

Please sign in to comment.