1
mirror of https://github.com/jakejarvis/hugo-extended.git synced 2025-04-26 14:38:28 -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!`));
});

11
package-lock.json generated
View File

@ -11,6 +11,7 @@
"license": "MIT",
"dependencies": {
"bin-wrapper": "^4.1.0",
"picocolors": "^1.0.0",
"pkg-conf": "^4.0.0",
"rimraf": "^3.0.2"
},
@ -1951,6 +1952,11 @@
"resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
"integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA="
},
"node_modules/picocolors": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
"integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
},
"node_modules/pify": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
@ -4011,6 +4017,11 @@
"resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
"integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA="
},
"picocolors": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
"integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
},
"pify": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",

View File

@ -20,6 +20,7 @@
},
"dependencies": {
"bin-wrapper": "^4.1.0",
"picocolors": "^1.0.0",
"pkg-conf": "^4.0.0",
"rimraf": "^3.0.2"
},