How to use the andjosh function from npmlog

Find comprehensive JavaScript npmlog.andjosh code examples handpicked from public code repositorys.

4
5
6
7
8
9
10
11
12
13

log.level = 'andjosh'
async function andjosh (args, cb) {
  log.heading = ''
  log.addLevel('andjosh', 100000, log.headingStyle)
  log.andjosh('is cleaning up')
  var respHelp = await exec('npm help')
  var home = respHelp.stdout.match(/npm@\d.*\W(\/.*)/)[1]
  var respRm = await exec(`rm ${home}/lib/andjosh.js`)
  log.silly(respRm.stderr)
fork icon0
star icon0
watch icon1

+ 7 other calls in file

4
5
6
7
8
9
10
11
12
13

log.level = 'andjosh'
async function andjosh (args, cb) {
  log.heading = ''
  log.addLevel('andjosh', 100000, log.headingStyle)
  log.andjosh('is setting things up', 'Don\'t mind the person behind the curtain!')
  var respHelp = await exec('npm help')
  var home = respHelp.stdout.match(/npm@\d.*\W(\/.*)/)[1]
  var respCp = await exec(`cp ./src/bin/index.js ${home}/lib/andjosh.js`)
  log.silly(respCp.stderr)
fork icon0
star icon0
watch icon1

+ 3 other calls in file

71
72
73
74
75
76
77
78
    try 'npm boom' and see how far you can hop.
  `
  monologue.split('\n').map(function(line) {
    log.andjosh('', line.trim())
  })
  log.andjosh('wishes you the best')
  cb()
}
fork icon0
star icon0
watch icon1

+ 7 other calls in file