mirror of
https://github.com/pa11y/pa11y-dashboard.git
synced 2025-09-24 22:31:15 +00:00
Replace Chalk with Kleur (#264)
- Remove Chalk - Add Kleur - Update index.js - Update copyright in README Fixes #256
This commit is contained in:
22
index.js
22
index.js
@@ -14,7 +14,7 @@
|
||||
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
|
||||
'use strict';
|
||||
|
||||
const chalk = require('chalk');
|
||||
const kleur = require('kleur');
|
||||
const config = require('./config');
|
||||
|
||||
process.on('SIGINT', () => {
|
||||
@@ -29,16 +29,16 @@ require('./app')(config, (error, app) => {
|
||||
}
|
||||
|
||||
console.log('');
|
||||
console.log(chalk.underline.magenta('Pa11y Dashboard started'));
|
||||
console.log(chalk.grey('mode: %s'), process.env.NODE_ENV);
|
||||
console.log(chalk.grey('uri: %s'), app.address);
|
||||
console.log(kleur.underline().magenta('Pa11y Dashboard started'));
|
||||
console.log(kleur.grey('mode: %s'), process.env.NODE_ENV);
|
||||
console.log(kleur.grey('uri: %s'), app.address);
|
||||
|
||||
app.on('route-error', error => {
|
||||
const stack = (error.stack ? error.stack.split('\n') : [error.message]);
|
||||
const msg = chalk.red(stack.shift());
|
||||
const msg = kleur.red(stack.shift());
|
||||
console.error('');
|
||||
console.error(msg);
|
||||
console.error(chalk.grey(stack.join('\n')));
|
||||
console.error(kleur.grey(stack.join('\n')));
|
||||
});
|
||||
|
||||
// Start the webservice if required
|
||||
@@ -50,11 +50,11 @@ require('./app')(config, (error, app) => {
|
||||
}
|
||||
|
||||
console.log('');
|
||||
console.log(chalk.underline.cyan('Pa11y Webservice started'));
|
||||
console.log(chalk.grey('mode: %s'), process.env.NODE_ENV);
|
||||
console.log(chalk.grey('uri: %s'), webservice.server.info.uri);
|
||||
console.log(chalk.grey('database: %s'), config.webservice.database);
|
||||
console.log(chalk.grey('cron: %s'), config.webservice.cron);
|
||||
console.log(kleur.underline().cyan('Pa11y Webservice started'));
|
||||
console.log(kleur.grey('mode: %s'), process.env.NODE_ENV);
|
||||
console.log(kleur.grey('uri: %s'), webservice.server.info.uri);
|
||||
console.log(kleur.grey('database: %s'), config.webservice.database);
|
||||
console.log(kleur.grey('cron: %s'), config.webservice.cron);
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user