UNPKG

roc

Version:

Build modern web applications easily

114 lines (94 loc) 2.5 kB
'use strict'; exports.__esModule = true; exports.error = error; exports.warning = warning; exports.ok = ok; exports.important = important; exports.errorLabel = errorLabel; exports.warningLabel = warningLabel; exports.okLabel = okLabel; exports.importantLabel = importantLabel; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _chalk = require('chalk'); var _chalk2 = _interopRequireDefault(_chalk); /** * Formats a string suitable for error output. * * @param {string} text - The text to format for errors. * * @returns {string} - The formatted text. */ function error(text) { return _chalk2['default'].red(text); } /** * Formats a string suitable for warnings. * * @param {string} text - The text to format for warnings. * * @returns {string} - The formatted text. */ function warning(text) { return _chalk2['default'].yellow(text); } /** * Formats a string suitable for confirmations. * * @param {string} text - The text to format for confirmations. * * @returns {string} - The formatted text. */ function ok(text) { return _chalk2['default'].green(text); } /** * Formats a string suitable for important messages. * * @param {string} text - The text to format for important messages. * * @returns {string} - The formatted text. */ function important(text) { return _chalk2['default'].cyan(text); } /** * Formats a string suitable for error labels. * * @param {string} text - The text to format for error labels. * * @returns {string} - The formatted text. */ function errorLabel(text) { return _chalk2['default'].bgRed(_chalk2['default'].white(text)); } /** * Formats a string suitable for warning labels. * * @param {string} text - The text to format for warning labels. * * @returns {string} - The formatted text. */ function warningLabel(text) { return _chalk2['default'].bgYellow(_chalk2['default'].white(text)); } /** * Formats a string suitable for confirmation labels. * * @param {string} text - The text to format for confirmation labels. * * @returns {string} - The formatted text. */ function okLabel(text) { return _chalk2['default'].bgGreen(_chalk2['default'].white(text)); } /** * Formats a string suitable for important labels. * * @param {string} text - The text to format for important labels. * * @returns {string} - The formatted text. */ function importantLabel(text) { return _chalk2['default'].bgCyan(_chalk2['default'].black(text)); } //# sourceMappingURL=style.js.map