How to use the npmlog.heading function in npmlog

To help you get started, we’ve selected a few npmlog examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github appcelerator / titanium_mobile / node_modules / sqlite3 / node_modules / node-pre-gyp / lib / node-pre-gyp.js View on Github external
'reinstall',
      'build',
      'rebuild',
      'package',
      'testpackage',
      'publish',
      'unpublish',
      'info',
      'testbinary',
      'reveal',
      'configure'
    ];
var aliases = {};

// differentiate node-pre-gyp's logs from npm's
log.heading = 'node-pre-gyp';

exports.find = require('./pre-binding').find;

function Run() {
  var self = this;

  this.commands = {};

  commands.forEach(function (command) {
    self.commands[command] = function (argv, callback) {
      log.verbose('command', command, argv);
      return require('./' + command)(self, argv, callback);
    };
  });
}
inherits(Run, EE);
github mqlight / nodejs-mqlight / mqlight-log.js View on Github external
npmlog.on('log', function(m) {
      if (fd) {
        if (npmlog.levels[npmlog.level] <= npmlog.levels[m.level]) {
          // We'll get called for every log event, so filter to ones we're
          // interested in.
          fs.writeSync(fd, util.format('%s %s %s %s\n',
                                       npmlog.heading, npmlog.disp[m.level],
                                       m.prefix, m.message));
        }
      }
    });
  }
github ShieldBattery / ShieldBattery / deps / node / deps / npm / lib / npm.js View on Github external
npmconf.load(cli, builtin, function (er, conf) {
      if (er === conf) er = null

      npm.config = conf

      var color = conf.get("color")

      log.level = conf.get("loglevel")
      log.heading = "npm"
      log.stream = conf.get("logstream")
      switch (color) {
        case "always": log.enableColor(); break
        case false: log.disableColor(); break
      }
      log.resume()

      if (er) return cb(er)

      // see if we need to color normal output
      switch (color) {
        case "always":
          npm.color = true
          break
        case false:
          npm.color = false
github mapbox / node-pre-gyp / lib / node-pre-gyp.js View on Github external
'reinstall',
      'build',
      'rebuild',
      'package',
      'testpackage',
      'publish',
      'unpublish',
      'info',
      'testbinary',
      'reveal',
      'configure'
    ];
var aliases = {};

// differentiate node-pre-gyp's logs from npm's
log.heading = 'node-pre-gyp';

exports.find = require('./pre-binding').find;

function Run() {
  var self = this;

  this.commands = {};

  commands.forEach(function (command) {
    self.commands[command] = function (argv, callback) {
      log.verbose('command', command, argv);
      return require('./' + command)(self, argv, callback);
    };
  });
}
inherits(Run, EE);
github sx1989827 / DOClever / node_modules / fsevents / node_modules / node-pre-gyp / lib / node-pre-gyp.js View on Github external
'reinstall',
      'build',
      'rebuild',
      'package',
      'testpackage',
      'publish',
      'unpublish',
      'info',
      'testbinary',
      'reveal',
      'configure'
    ];
var aliases = {};

// differentiate node-pre-gyp's logs from npm's
log.heading = 'node-pre-gyp';

exports.find = require('./pre-binding').find;

function Run() {
  var self = this;

  this.commands = {};

  commands.forEach(function (command) {
    self.commands[command] = function (argv, callback) {
      log.verbose('command', command, argv);
      return require('./' + command)(self, argv, callback);
    };
  });
}
inherits(Run, EE);
github ptmt / rnpm-plugin-apphub / src / action.js View on Github external
const path = require('path');
const log = require('npmlog');
const https = require('https');
const fs = require('fs');
const url = require('url');
const projectMetadata = require('./projectMetadata');
const glob = require('glob');
const childProcess = require('child_process');
const uuid = require('uuid');
const mkdirp = require('mkdirp');

const APPHUB_API = 'https://api.apphub.io/v1/upload';

log.heading = 'rnpm-apphub';

/**
 * Updates project and linkes all dependencies to it
 *
 * If optional argument [packageName] is provided, it's the only one that's checked
 */
module.exports = function link(config, args) {
  const project = config.getProjectConfig();

  if (!project) {
    log.error('ERRPACKAGEJSON', `No package found. Are you sure it's a React Native project?`);
    return;
  }

  if (!project.ios) {
    log.error('ERRPACKAGEJSON', `No ios project found. Currently AppHub is only for iOS`);
github rdmtc / RedMatic / prebuilt / armv6l / lib / node_modules / node-red-contrib-johnny-five / node_modules / prebuild-install / log.js View on Github external
module.exports = function (rc, env) {
  log.heading = 'prebuild-install'

  if (rc.verbose) {
    log.level = 'verbose'
  } else {
    log.level = env.npm_config_loglevel || 'notice'
  }

  return log
}
github graalvm / graaljs / deps / npm / lib / xmas.js View on Github external
w(x + '\u001b[32m' + b + '\n')
      w(x + '\u001b[0m')
    }
    w(' ')
    for (i = 1; i < H; i++) w('\u001b[32m' + l)
    w('| ' + x + ' |')
    for (i = 1; i < H; i++) w('\u001b[32m' + l)
    if (H > 10) {
      w('\n ')
      for (i = 1; i < H; i++) w(' ')
      w('| ' + x + ' |')
      for (i = 1; i < H; i++) w(' ')
    }
  })(20)
  w('\n\n')
  log.heading = ''
  log.addLevel('npm', 100000, log.headingStyle)
  log.npm('loves you', 'Happy Xmas, JavaScripters!')
  cb()
}
var dg = false
github LiferayCloud / magnet / src / log.js View on Github external
import log from 'npmlog';

log.heading = '>';
log.headingStyle = {fg: 'grey', bg: 'black'};

log.addLevel('infoNoPrefix', 2000, {}, '');
log.level = 'info';

export default log;
github hoodiehq / hoodie / lib / log.js View on Github external
warn: {fg: 'brightYellow', bold: true},
  error: {fg: 'brightRed', bold: true},
  silent: undefined
}
log.prefixStyle = {fg: 'magenta'}
log.headingStyle = {}
log.disp = {
  silly: 'Sill' + emoji.get('mega') + ' ',
  verbose: 'Verb' + emoji.get('speech_balloon') + ' ',
  info: 'Info' + emoji.get('mag') + ' ',
  http: 'HTTP' + emoji.get('link') + ' ',
  warn: 'Warn' + emoji.get('zap') + ' ',
  error: 'Err!' + emoji.get('anger') + ' ',
  silent: 'silent'
}
log.heading = emoji.get('dog') + ' Hoodie'
log.level = 'error'