UNPKG

fnbl

Version:
34 lines (28 loc) 1.03 kB
const colors = { reset: '\x1b[0m', bright: '\x1b[1m', fg: { red: '\x1b[31m', blue: '\x1b[34m', white: '\x1b[37m' }, bg: { red: '\x1b[41m' } }; const style = (...codes) => (text) => `${codes.join('')}${text}${colors.reset}`; const redBg = style(colors.bg.red); const redBgWhiteText = style(colors.bg.red, colors.fg.white, colors.bright); const blueText = style(colors.fg.blue); const bright = style(colors.bright); const redText = style(colors.fg.red); const errorText = ' This is not the FNLB package you are looking for. '; console.log(); console.log(redBg(' '.repeat(errorText.length))); console.log(redBgWhiteText(errorText)); console.log(redBg(' '.repeat(errorText.length))); console.log(); console.log(`To install the real ${blueText(bright('FNLB package'))}:\n`); console.log(`- Use ${bright(`npm install ${blueText('fnlb')}@latest`)} instead of ${redText('fnbl')}.`); console.log(); process.exit(1);