Skip to content

Commit

Permalink
Added chalk to format cli output.
Browse files Browse the repository at this point in the history
  • Loading branch information
trishantpahwa committed Jan 22, 2022
1 parent 587fa4d commit e8eb418
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const glob = require("glob");
const glob = require('glob');
const chalk = require('chalk');

const exclusions = ['node_modules', 'tester'];

Expand All @@ -22,6 +23,7 @@ getDirectories(__dirname, function (err, res) {
} else {
let listOfFiles;
listOfFiles = res.filter(element => !excludeIsPresent(element));
console.log(listOfFiles);
console.log(chalk.green('Found files:'))
listOfFiles.map((file) => console.log('\t' + chalk.bgGrey(file)));
}
});
43 changes: 43 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
},
"homepage": "https://github.com/trishantpahwa/dorky#readme",
"dependencies": {
"chalk": "^4.1.2",
"glob": "^7.2.0"
}
}

0 comments on commit e8eb418

Please sign in to comment.