mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-13 01:15:47 +01:00
feat: remove colors in favour of chalk (#10142)
* feat: remove colors in favour of chalk * fix: bad conversion from colors to chalk in src/cli/index.js * fix: padWidth calculation to account for control characters * fix: termWidth calculation, but swapped one problem for another * fix: formatItem, implement my own padRight to take control characters into account
This commit is contained in:
@@ -5,6 +5,7 @@ const path = require('path');
|
||||
const winston = require('winston');
|
||||
const semver = require('semver');
|
||||
const nconf = require('nconf');
|
||||
const chalk = require('chalk');
|
||||
const request = require('request-promise-native');
|
||||
|
||||
const user = require('../user');
|
||||
@@ -117,7 +118,7 @@ Plugins.reload = async function () {
|
||||
console.log('');
|
||||
winston.warn('[plugins/load] The following plugins may not be compatible with your version of NodeBB. This may cause unintended behaviour or crashing. In the event of an unresponsive NodeBB caused by this plugin, run `./nodebb reset -p PLUGINNAME` to disable it.');
|
||||
for (let x = 0, numPlugins = Plugins.versionWarning.length; x < numPlugins; x += 1) {
|
||||
console.log(' * '.yellow + Plugins.versionWarning[x]);
|
||||
console.log(`${chalk.yellow(' * ') + Plugins.versionWarning[x]}`);
|
||||
}
|
||||
console.log('');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user