cli-fail

2019-08-14

cli-fail是什么

什么是cli-fail,Fail with an error message and a correct exit code

cli-fail使用教程帮助文档

cli-fail Build Status

Fail with an error message and a correct exit code

Install

$ npm install --save cli-fail

Usage

var fail = require('cli-fail')

fail('it broke')
//=> prints "it broke" to console.error and exits with code 1

fail(new Error())
//=> prints err to console.error, then stack, then exits with code 1

API

fail(err)

err

Required Type: string / error

An error message or full error object to log.

License

MIT © Ben Drucker


上一篇:grunt-cmd-package
下一篇:is-package
相关文章

首次访问,人机识别验证

扫描下方二维码回复 1024 获取验证码,验证完毕后 永久 无须验证

操作步骤:[打开微信]->[扫描上侧二维码]->[关注 FedJavaScript 的微信] 输入 1024 获取验证码

验证码有误,请重新输入