1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.exit = exports.success = exports.error = exports.warn = exports.info = void 0;
|
7 |
|
8 | var _chalk = _interopRequireDefault(require("chalk"));
|
9 |
|
10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11 |
|
12 | const logger = (type, color) => (...messages) => {
|
13 | console.log(color(_chalk.default.bold(type)), ...messages);
|
14 | };
|
15 |
|
16 | const info = logger('ℹ', _chalk.default.blue);
|
17 | exports.info = info;
|
18 | const warn = logger('⚠', _chalk.default.yellow);
|
19 | exports.warn = warn;
|
20 | const error = logger('✖', _chalk.default.red);
|
21 | exports.error = error;
|
22 | const success = logger('✔', _chalk.default.green);
|
23 | exports.success = success;
|
24 |
|
25 | const exit = (...messages) => {
|
26 | error(...messages);
|
27 | process.exit(1);
|
28 | };
|
29 |
|
30 | exports.exit = exit;
|
31 |
|
\ | No newline at end of file |