1
mirror of https://github.com/jakejarvis/hugo-extended.git synced 2025-10-16 12:14:26 -04:00

Add picocolors for installation messages

This commit is contained in:
XhmikosR
2021-12-09 10:27:43 +02:00
parent 564f33b4c9
commit 6f36fb3177
3 changed files with 15 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
import path from 'node:path';
import process from 'node:process';
import picocolors from 'picocolors';
import bin from './index.js';
function getProjectRoot() {
@@ -24,8 +25,8 @@ function getProjectRoot() {
bin(getProjectRoot()).run(['version'])
.then(() => {
console.log('Hugo binary successfully installed!');
console.log(picocolors.green('Hugo binary successfully installed!'));
})
.catch(error => {
console.error(`${error.message}\nHugo binary installation failed!`);
console.error(picocolors.red(`${error.message}\nHugo binary installation failed!`));
});