1.0.1 • Published 7 years ago

recreate-plugin-print v1.0.1

Weekly downloads
28
License
-
Repository
github
Last release
7 years ago

recreate-plugin-print

Pretty print for the terminal

Use this so that your plugin looks consistent with the rest of the experience.

 

Usage

// Require what you need from recreate-plugin-print

const {info, warn} = require('recreate-plugin-print');

/*

  There are 6 functions:

  Print to stdout:
  1. info: (label, message)
  2. loading: (label, message)
  3. warning: (message)
  4. error: (message)

  Returns pretty string (does not print)
  5. command: (command)
  6. link: (url)

*/

if (!process.env.PRODUCTION) info('BUILD', 'Running dev stuff');
else {
  let prettyCommand = command('npm run dev')
  warn('This is production mode! Run this in dev ' + prettyCommand);