How to use the figlet.textSync function in figlet

To help you get started, weโ€™ve selected a few figlet 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 pankod / next-boilerplate / project-cli / index.ts View on Github external
import * as chalk from 'chalk';
/* import * as clear from 'clear'; */
import * as program from 'commander';
import * as figlet from 'figlet';
import * as inquirer from 'inquirer';

import { classComp } from './src/definitions/class-component';
import { funcComp } from './src/definitions/functional-component';
import { pageComp } from './src/definitions/page-component';

console.clear();

console.log(
	chalk.default(
		figlet.textSync('Pankod CLI Boilerplate')
	)
);

const questions = [
	{
		choices: ['page', 'functional component', 'class component'],
		message: 'What do you want to add?',
		name: 'fileType',
		type: 'list'
	}
];

program
	.command('addFile')
	.alias('a')
	.description('Add a file')
github cloudcomponents / cdk-components / tools / build-tools / src / cli.ts View on Github external
import * as yargs from 'yargs';
import * as chalk from 'chalk';
import * as figlet from 'figlet';

import * as zipLambda from './commands/zip-lambda';
import * as create from './commands/create';

const NAME = 'cloudcomponents';

// eslint-disable-next-line no-console
console.log(chalk.red(figlet.textSync(NAME)), '\n');

// eslint-disable-next-line @typescript-eslint/no-var-requires
const { version } = require('../package.json');

// eslint-disable-next-line no-unused-expressions
yargs
    .version(version)
    .scriptName(NAME)
    .help('help')
    .command(zipLambda)
    .command(create).argv;
github pankod / next-boilerplate / project-cli2 / index.ts View on Github external
import * as chalk from 'chalk';
/* import * as clear from 'clear'; */
import * as program from 'commander';
import * as figlet from 'figlet';
import * as inquirer from 'inquirer';

import { classComp } from './src/definations/class-component';
import { funcComp } from './src/definations/functional-component';
import { pageComp } from './src/definations/page-component';

console.clear();

console.log(
	chalk.default(
		figlet.textSync('Pankod CLI Boilerplate')
	)
);

const questions = [
	{
		choices: ['page', 'functional component', 'class component'],
		message: 'What do you want to add?',
		name: 'fileType',
		type: 'list'
	}
];

program
	.command('addFile')
	.alias('a')
	.description('Add a file')
github sogehige / sogeBot / src / bot / main.ts View on Github external
require('./events');
    require('./customvariables');
    panel = require('./panel');
    require('./twitch');
    require('./permissions');
    translate = require('./translate');
    require('./oauth');
    require('./webhooks');
    require('./api');
  } catch (e) {
    error(e);
    process.exit();
  }

  const version = _.get(process, 'env.npm_package_version', 'x.y.z');
  process.stdout.write(figlet.textSync('sogeBot ' + version.replace('SNAPSHOT', gitCommitInfo().shortHash || 'SNAPSHOT'), {
    font: 'ANSI Shadow',
    horizontalLayout: 'default',
    verticalLayout: 'default',
  }));
  process.stdout.write('\n\n\n');
  info('Bot is starting up');
  translate.default._load().then(async () => {
    await autoLoad('./dest/stats/');
    await autoLoad('./dest/registries/');
    await autoLoad('./dest/systems/');
    await autoLoad('./dest/widgets/');
    await autoLoad('./dest/overlays/');
    await autoLoad('./dest/games/');
    await autoLoad('./dest/integrations/');

    if (isMainThread) {
github Marvin1003 / webpack-installer / es / installer.js View on Github external
(async function setup() {
  if ("clear" in global.console) console.clear();

  console.log(chalk.green(figlet.textSync("webpack  -  installer")));
  console.log(chalk`\nWelcome to {green.bold webpack-installer}!\n`);

  const cliMenu = cli.generateMenu(prompt);

  let res;
  (async function menu() {
    do {
      res = await cliMenu(res);
    } while (!Array.isArray(res));

    const path = res.map(input => input.toLowerCase()).join("/");
    process.env.CONFIG = path;
    generateConfig(res);
  })();

  async function generateConfig(configType) {
github sheminusminus / apple-music-token-node / lib / cli.js View on Github external
#!/usr/bin/env node

const chalk = require('chalk');
const figlet = require('figlet');
const clear = require('clear');

const inquiry = require('./inquiry');
const gen = require('./gen');

const log = console.log;

clear();

const amtnAscii = figlet.textSync('amtn <3', { horizontalLayout: 'default', font: 'Swan' });
const amtnPretty = chalk.magenta.bold(amtnAscii);

log(amtnPretty);

const run = async () => {
  let altPath = null;
  const team = await inquiry.askTeamId();
  const key = await inquiry.askKeyId();
  const fp = await inquiry.askFilePath();
  const confirm = await inquiry.askConfirmFile();
  const time = await inquiry.askExpiration();
  if (confirm) altPath = inquiry.getAltPath();
  const tokenData = gen(altPath || fp.filePath, team.teamId, key.keyId, time.expires)
  log(tokenData);
};
github twilio / autopilot-cli / cmd / help.js View on Github external
module.exports = (args) => {
  
  clear()

  const subCmd = args._[0] === 'help'
    ? args._[1]
    : args._.length === 2 ? args._[1] : args._[0]

    console.log(
      chalk.red(
        figlet.textSync('Twilio Autopilot', { horizontalLayout: 'full' })
      )
    )

    console.log(menus[subCmd] || menus.main)
}
github nodulusteam / methodus.dev / src / server.ts View on Github external
async printlogo() {

        const options: any = {
            font: 'Bigfig',
            horizontalLayout: 'default',
            verticalLayout: 'default',
        };
        console.log(figlet.textSync('methodus', options));
    }
github ArcBlock / forge-js / apps / forge-cli / src / core / env.js View on Github external
function printLogo() {
  shell.echo('');
  shell.echo(chalk.red(figlet.textSync('By ArcBlock', { font: 'ANSI Shadow' })));
}
github AlexLakatos / ascii-themes / index.js View on Github external
generate: (text, font = "Slant Relief", themeName = "Monokai Dimmed", horizontalLayout = "default", verticalLayout = "default") => {
    var coloredData = "";
    var colorsIndex = 0;
    const theme = themes[themeName];
    var data;

    if (!themes[themeName]) {
      throw `"${themeName}" is not a supported theme. You can add it at https://github.com/AlexLakatos/ascii-themes.`
    }

    try {
      data = figlet.textSync(text, {
        font: font,
        horizontalLayout: horizontalLayout,
        verticalLayout: verticalLayout
      });
    } catch (error) {
      return error
    }

    if (themeName === "plain") {
      return data;
    }

    for (var i = 0; i < data.length; i++) {
      var character = data.charAt(i)
      if (character !== "_") {
        if (data.charAt(i - 1) == "_" || data.charAt(i - 1) == " " || data.charAt(i - 1) == ".") {

figlet

Creates ASCII Art from text. A full implementation of the FIGfont spec.

MIT
Latest version published 2 months ago

Package Health Score

85 / 100
Full package analysis