Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
cfx.stdout.on('data', function (data) {
console.log(clc.xterm(250)(data));
switch (stage) {
case 0:
cfx.stdin.write(isWindows ? "activate\n" : "echo step 1&&source bin/activate\n");
stage += 1;
break;
case 1:
stage += 1;
break;
case 2:
var cmd = "echo step 2&&cd " + require("path").join(__dirname, '..');
if (isWindows) cmd += "&&" + /\w\:/.exec(require("path").resolve('.'))[0];
cfx.stdin.write(cmd + "\n");
stage += 1;
break;
case 3:
cfx.stdin.write("echo step 3&&cd src.safariextension\n");
module.exports.info = str => console.log(clc.xterm(55)(str));
import pkg from '../../package.json';
import updateNotifier from 'update-notifier';
import { clearScreen } from 'ansi-escapes';
import { debounce } from 'lodash';
import { tick, cross } from 'figures';
const isMac = /^darwin/.test(process.platform);
process.title = 'esbox';
updateNotifier({ pkg }).notify();
const red = cc.red;
const black = cc.black;
const bgWhite = cc.xtermSupported ? cc.bgXterm(250) : cc.bgWhite;
const brown = cc.xtermSupported ? cc.xterm(137) : cc.yellow;
const grey = cc.xtermSupported ? cc.xterm(241) : cc.blackBright;
const help = `
${bgWhite(' ')}
${bgWhite(` ${isMac ? '📦' : ''} ${black('ES2016 in a box')} `)}
${bgWhite(` ${grey('git.io/esbox')} `)}
${bgWhite(' ')}
${brown('Usage')}
${grey('>')} esbox ${grey('FILENAME')}
${brown('Options')}
--cwd=${grey('DIRECTORY')} run in a different directory
--no-watch only run your script once
--no-clear disable clearing the display before each run
--version show esbox version
module.exports.info = function (str) {
process.stdout.write(clc.xterm(55)(str) + '\n');
};
#!/usr/bin/env node
var through2 = require('through2');
var clc = require('cli-color');
var program = require('commander');
var pkg = require('./package.json');
var cssPurge = require('./lib/css-purge');
var error = clc.red.bold;
var info = clc.xterm(123);
var warn = clc.yellow;
var logoRed = clc.xterm(197);
program
.version(pkg.version)
.option('-c, --cssinput - CSS ', 'The CSS to purge')
.option('-i, --input - CSS file(s) <input>', 'The CSS file(s) to parse')
.option('-m, --inputhtml - HTML file(s) <input>', 'The HTML file(s) to parse for CSS')
.option('-o, --output - CSS file <output>', 'The new css filename to output as')
.option('-f, --customconfig - - run with custom config filename', 'Global Workflow - All options must be defined in a json file')
.option('-d, --defaultconfig - run with default config file', 'Local Workflow - All options are defined in a config_css.json')
.option('-v, --verbose - displays internal messages', 'Outputs CSS-PURGE activity')
.parse(process.argv);
var options = {};
</output>
module.exports.highlight = function (str) {
process.stdout.write(clc.xterm(202)(str) + '\n');
};
if (includeTimestamp) {
process.stdout.write(this.yellow(` +${Date.now() - Logger.prevTimestamp}ms`));
}
Logger.prevTimestamp = Date.now();
}
static printStackTrace(trace) {
if (this.contextEnv === nest_environment_enum_1.NestEnvironment.TEST || !trace)
return;
process.stdout.write(trace);
process.stdout.write(`\n`);
}
}
Logger.prevTimestamp = null;
Logger.contextEnv = nest_environment_enum_1.NestEnvironment.RUN;
Logger.logger = Logger;
Logger.yellow = clc.xterm(3);
exports.Logger = Logger;
const asId = `${as.original.source}${as.original.line}`;
const bsId = `${bs.original.source}${bs.original.line}`;
if (asId < bsId) {
return -1;
} else if (asId > bsId) {
return 1;
}
return 0;
});
for (const issue of issues) {
let msg = '';
let severityColor = clc.xterm(32);
if (issue.severity === 'error') {
severityColor = clc.red;
} else if (issue.severity === 'warn') {
severityColor = clc.yellow;
}
if (counts[issue.severity] === undefined) {
counts[issue.severity] = 0;
}
counts[issue.severity]++;
const sourcemap = getFirstSourcemap(issue.element);
let info = {number: '?', remainder: '?', lines: []};
function colorByIterations(iterations) {
if (iterations != -1) {
var color = clcColors[iterations%clcColors.length];
return clc.xterm(color)("0");
}
return clc.xterm(0)("0");
}
const calculateHelp = def => clc.xterm(8)(`\nDef: \n${stringify(def)}\n\nKeys:\n${stringify(keys)}`)