function commandHelp() { console.log( [ kleur.underline('Usage'), '', ' ' + kleur.bold('styleguidist') + ' ' + kleur.cyan('<command>') + ' ' + kleur.yellow('[<options>]'), '', kleur.underline('Commands'), '', ' ' + kleur.cyan('build') + ' Build style guide', ' ' + kleur.cyan('server') + ' Run development server', ' ' + kleur.cyan('help') + ' Display React Styleguidist help', '', kleur.underline('Options'), '', ' ' + kleur.yellow('--config') + ' Config file path', ' ' + kleur.yellow('--open') + ' Open Styleguidist in the default browser', ' ' + kleur.yellow('--verbose') + ' Print debug information', ].join('\n') ); }
/** * @param {string} message * @param {string} linkTitle * @param {string} linkUrl */ function printErrorWithLink(message, linkTitle, linkUrl) { console.error(`${kleur.bold.red(message)}\n\n${linkTitle}\n${kleur.underline(linkUrl)}\n`); }
/** * @param {object} config */ function printBuildInstructions(config) { console.log('Style guide published to:\n' + kleur.underline(config.styleguideDir)); }