How to use the figlet.text 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 SurenAt93 / DevBattle / app.js View on Github external
server.listen(env.port || config.get('port'), _ => {
  figlet.text('connect', (err, data) => {
    if (err) return console.error(err); // TODO ::: Create ErrorHandler
      console.log(data);
    })
});
github gaowhen / gon / bin / proxy.js View on Github external
function spawn() {
	figlet.text('Gon', {
		font: 'univers',
	}, (err, data) => {
		if (err) {
			console.error(err)
			return
		}

		console.log(data)
		console.log('Okay dokey, ready to work…')
	})

  const gulp = path.join(__dirname, '../node_modules/gulp-cli/bin/gulp.js')
  const gulpfile = path.join(__dirname, 'gulpfile.babel.js')

  // --gulpfile  will manually set path of gulpfile. Useful if you have multiple gulpfiles. This will set the CWD to the gulpfile directory as well
  subApp = exec(`${gulp} --color --gulpfile ${gulpfile} --cwd ${CWD}` , (error, stdout) => {
github pjobson / movie2ascii / movie2ascii.node.js View on Github external
const showInfoPage = (deferred) => {
	// { fontlist: true/false, formats: true/false, codecs: true/false }
	if (global.info.fontsample) {
		console.log(`Sample of: ${global.info.fontsample}\n`);
		figlet.text(global.info.fontsample , {
			font: global.info.fontsample
		}, (err, data) => {
			if (err) {
				console.log(err);
				deferred.reject(err);
			} else {
				console.log(data);
				return deferred.resolve();
			}
		});
	}
	// List of Figlet Fonts
	if (global.info.fontlist) {
		console.log('Available fonts:');
		figlet.fonts((err, fonts) => {
			let fout = [];
github deecewan / boilerpl8 / src / index.js View on Github external
import chokidar from 'chokidar';
import http from 'http';
import express from 'express';
import webpack from 'webpack';
import webpackDevMiddleware from 'webpack-dev-middleware';
import webpackHotMiddleware from 'webpack-hot-middleware';
import env from 'dotenv';
import chalk from 'chalk';
import figlet from 'figlet';
import reporter from './server/lib/webpackReporter';

import { name } from '../package.json';

env.config();

figlet.text(`Welcome to \n ${process.env.APPLICATION_NAME || name}`, {
  verticalLayout: 'full',
  kerning: 'fitted',
}, (err, data) => {
  if (!err) {
    console.log(chalk.green(data));
  }
});

const app = express();
if (process.env.NODE_ENV === 'development') {
  const config = require('../webpack.config.babel.js').default; // eslint-disable-line
  const compiler = webpack(config);

// Serve hot-reloading bundle to client
  app.use(webpackDevMiddleware(compiler, {
    publicPath: config.output.publicPath,
github IonicaBizau / text-animation / lib / index.js View on Github external
boxOptions.height = options.size[1];
    } else {
        boxOptions.fullscreen = true;
        process.stdout.columns = process.stdout.columns || 80;
        process.stdout.rows = process.stdout.rows || 60;
    }

    var box = options.box = new CliBox(boxOptions)
      , font = options.font || "Graffiti"
      , text = options.text
      , frames = []
      ;


    // Render the text
    Figlet.text(text, {
        font: font,
    }, function(err, data) {

        if (err) {
            return options.end(err, data);
        }

        options.rText = data;

        try {
            frames = require("./animations/" + options.animation)(options);
        } catch (e) {
            return options.end(e);
        }

        new CliFrames({
github react-native-training / create-xp-app / bin / build.js View on Github external
const build = (appName) => {
  cp('-r', __dirname + '/../src/.', appName);
  console.log('----------------------------------------------------------');
  figlet.text('React XP', {
    font: 'Graffiti'
  }, function(err, data) {
    if (err) {
      console.log(chalk.white.bold('React XP'));
    } else {
      console.log(data);
    }
    console.log('----------------------------------------------------------');
    console.log(chalk.green.bold('Welcome to ReactXP'));
    console.log('----------------------------------------------------------');
    cd(appName);
    installPackages().then(() => {
      console.log(chalk.white.bold('Let\'s get started'));
      console.log(chalk.green('Step 1: cd into the newly created ' + appName + ' directory'));
      console.log('----------------------------------------------------------');
      console.log(chalk.white.bold('For Web'));
github Tencent / feflow / lib / feflow.js View on Github external
function printBanner() {
    figlet.text('feflow', {
      font: '3D-ASCII',
      horizontalLayout: 'default',
      verticalLayout: 'default'
    }, function (err, data) {
      if (err) {
        log.info('Something went wrong...');
        log.error(err);
        return;
      }

      console.log(chalk.cyan(data));
      console.log(chalk.cyan(` Feflow,当前版本v${feflow.version}, 让开发工作流程更简单,主页: https://github.com/cpselvis/feflow-cli      `));
      console.log(chalk.cyan(' (c) powered by IVWEB Team                                                                            '));
      console.log(chalk.cyan(' Run feflow --help to see usage.                                                                      '));
    });
  }
github liamray / nexl-js / backend / nexl-app / nexl-app.js View on Github external
(resolve, reject) => {
			figlet.text('nexl ' + version, {font: 'Doom'}, function (err, data) {
				if (err) {
					reject(err);
					return;
				}

				console.log(data);
				resolve();
			});

		});
}
github nos / create-nos-dapp / src / utils / ascii.js View on Github external
new Promise((resolve, reject) => {
    figlet.text(
      message,
      {
        font: font,
        horizontalLayout: "default",
        verticalLayout: "default",
      },
      (err, data) => {
        if (err) reject(err);
        resolve(data);
      }
    );
  });

figlet

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

MIT
Latest version published 9 months ago

Package Health Score

79 / 100
Full package analysis