How to use the boxen.BorderStyle function in boxen

To help you get started, we’ve selected a few boxen examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ayakashi-io / ayakashi / src / opLog / opLog.ts View on Github external
messageBox: function(logs: string[], opts?: {color?: string, margin?: number}) {
            if (env === "test") return;
            process.stdout.write(boxen(
                logs.reduce((msg, log) => msg + log + "\n", ""),
                {
                    borderColor: (opts && opts.color) || "cyan",
                    align: "center",
                    padding: 1,
                    borderStyle: boxen.BorderStyle.Double,
                    margin: (opts && opts.margin) || 0
                    // float: "center"
                }
            ) + "\n");
        },
        incrementalMessageBox: function(
github abmaonline / aemfed / src / messages.ts View on Github external
export function formatUpdateMessage(update?: IUpdateCheck) {
  if (update) {
    const message = `Update available ${chalk.dim(update.version)}${chalk.reset(
      " → "
    )}${chalk.green(update.latest)} \nRun ${chalk.cyan(
      "npm i " + (isInstalledGlobally ? "-g " : "") + update.name
    )} to update`;

    const boxenOpts: boxen.Options = {
      align: "center",
      borderColor: "yellow",
      borderStyle: boxen.BorderStyle.Round,
      margin: 1,
      padding: 1
    };
    return boxen.default(message, boxenOpts);
  }
}

boxen

Create boxes in the terminal

MIT
Latest version published 3 months ago

Package Health Score

82 / 100
Full package analysis