Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
server.listen(env.port || config.get('port'), _ => {
figlet.text('connect', (err, data) => {
if (err) return console.error(err); // TODO ::: Create ErrorHandler
console.log(data);
})
});
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) => {
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 = [];
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,
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({
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'));
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. '));
});
}
(resolve, reject) => {
figlet.text('nexl ' + version, {font: 'Doom'}, function (err, data) {
if (err) {
reject(err);
return;
}
console.log(data);
resolve();
});
});
}
new Promise((resolve, reject) => {
figlet.text(
message,
{
font: font,
horizontalLayout: "default",
verticalLayout: "default",
},
(err, data) => {
if (err) reject(err);
resolve(data);
}
);
});