knock-knock
basic information about the current project and environment
Table of Contents
Install
npm install knock-knock
Usage
KnockKnock([commands], callback)
- commands
Object
(Optional)
values are a command to execute, a trimmedstdout
orstderr
will be yielded - callback
Function
(err, result) => {}
default result
key | value |
---|---|
name | derived from package.json |
version | derived from package.json |
env | process.env.NODE_ENV |
node | node -v |
npm | npm -v |
Examples
using defaults
const KnockKnock =
passing custom command
const KnockKnock =
hapi endpoint
const Hapi = const KnockKnock = const server = const ping = server
Express endpoint
const Express = const KnockKnock = const app = const ping = app
Contribute
PRs welcome! Please read the contributing guidelines and the code of conduct.