Migrate to kleur

This commit is contained in:
Daniel Ruf
2019-06-03 10:23:53 +02:00
parent 6b59c51655
commit f3db3a52bf
12 changed files with 59 additions and 58 deletions

View File

@ -4,7 +4,7 @@
*/
const fs = require('fs-extra');
const path = require('path');
const chalk = require('chalk');
const { green, red } = require('kleur');
const util = require('./util');
const { rollup } = require('rollup');
const babel = require('rollup-plugin-babel');
@ -143,7 +143,7 @@ async function build() {
if (util.isTravisCI() && util.isNotTravisCronOrAPI()) {
fs.unlink(ROLLUP_INPUT_FILE);
console.log(
`${chalk.green(
`${green(
'NOBUILD'
)} Module build terminated, not a cron job or a custom build!`
);
@ -156,10 +156,10 @@ async function build() {
// Clean up the temporary input file Rollup used for building the module
fs.unlink(ROLLUP_INPUT_FILE);
console.log(`${chalk.green('SUCCESS!')} Snippet module built!`);
console.log(`${green('SUCCESS!')} Snippet module built!`);
console.timeEnd('Packager');
} catch (err) {
console.log(`${chalk.red('ERROR!')} During module creation: ${err}`);
console.log(`${red('ERROR!')} During module creation: ${err}`);
process.exit(1);
}
}