Skip to content
Open
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
13 changes: 1 addition & 12 deletions bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const os = require('os');
const path = require('path');
const { cyan, bold, dim, green, symbols } = require('ansi-colors');
const { cyan, green, symbols } = require('ansi-colors');
const deleteEmpty = require('..');
const argv = require('minimist')(process.argv.slice(2), {
boolean: true,
Expand All @@ -11,8 +11,6 @@ const argv = require('minimist')(process.argv.slice(2), {
rename: { _: 'files' }
});

const moduleDir = dim(`<${path.dirname(__dirname)}>`);
const name = pkg => bold(`delete-empty v${pkg.version}`);
const help = pkg => `
Path: <${path.dirname(__dirname)}>

Expand All @@ -36,15 +34,6 @@ if (argv.help) {

const ok = green(symbols.check);
const cwd = path.resolve(argv._[0] || argv.cwd || process.cwd());
const relative = filepath => {
if (filepath.startsWith(cwd)) {
return path.relative(cwd, filepath);
}
if (filepath.startsWith(os.homedir())) {
return path.join('~', filepath.slice(os.homedir().length));
}
return cwd;
};

if (argv.dryRun) {
argv.verbose = true;
Expand Down