Skip to content
This repository has been archived by the owner on Sep 12, 2019. It is now read-only.

Visual consistency and design in CLI logs #89

Closed
swyxio opened this issue Apr 5, 2019 · 7 comments · Fixed by #101
Closed

Visual consistency and design in CLI logs #89

swyxio opened this issue Apr 5, 2019 · 7 comments · Fixed by #101

Comments

@swyxio
Copy link
Contributor

swyxio commented Apr 5, 2019

currently our logs look like this: (compare with gatsby below)

image

with a little love we can make our CLI output look a lot better with some consistency. any ideas?

@swyxio
Copy link
Contributor Author

swyxio commented Apr 5, 2019

here's an example of how it could look
image

@swyxio
Copy link
Contributor Author

swyxio commented Apr 5, 2019

also lets fix that rediretor typo, it sticks out like a sore thumb

@calavera
Copy link
Contributor

calavera commented Apr 5, 2019

That redirector log is not really useful, let's remove it, or print it only in debug mode.

@swyxio
Copy link
Contributor Author

swyxio commented Apr 6, 2019

@swyxio
Copy link
Contributor Author

swyxio commented Apr 6, 2019

i have experimented with:

const NETLIFYDEV = chalk
  .rgb(40, 180, 170) // netlify colors
  .inverse
  .bold(`<Netlify Dev>`);

which looks like this

image

@swyxio
Copy link
Contributor Author

swyxio commented Apr 6, 2019

more subtle unicode branding/separators

« »


@swyxio
Copy link
Contributor Author

swyxio commented Apr 8, 2019

we tried

const chalk = require("chalk");
console.log(`[${chalk.cyan("Netlify Dev")}] The cake is a lie - original`);
console.log(${chalk.cyan("Netlify Dev")}» The cake is a lie - 1`);
console.log(
  `${chalk.rgb(40, 180, 170).bold("Netlify Dev")} ${chalk.greenBright(
    "◈"
  )} The cake is a lie - 2`
);
console.log(
  `${chalk.rgb(40, 180, 170).bold("Netlify Dev")} ${chalk.yellowBright(
    "◈"
  )} The cake is a lie - 2 - warning`
);
console.log(
  `${chalk.rgb(40, 180, 170).bold("Netlify Dev")} ${chalk.redBright(
    "◈"
  )} The cake is a lie - 2 error`
);
console.log(
  `${chalk.rgb(40, 180, 170)("Netlify Dev")} ${chalk.green(
    "◆"
  )} The cake is a lie - 3`
);
console.log(
  `${chalk.rgb(40, 180, 170)("Netlify Dev")} ${chalk.green(
    "◊"
  )} The cake is a lie - 4`
);
console.log(
  `${chalk.rgb(40, 180, 170)("Netlify Dev")} ${chalk.green(
    "◇"
  )} The cake is a lie - 5`
);
console.log(
  `${chalk.rgb(40, 180, 170)("Netlify Dev")} ${chalk.green(
    "↯"
  )} The cake is a lie - 6`
);
console.log(
  `${chalk.rgb(40, 180, 170)("Netlify Dev")} ${chalk.green(
    "⇄"
  )} The cake is a lie - 7`
);

and we like 2:

image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants