respond

WebJar for respond

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

respond
Last Version

Last Version

0.9.0
Release Date

Release Date

Type

Type

jar
Description

Description

respond
WebJar for respond
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/schme16/node-respond

Download respond

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/respond/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>respond</artifactId>
    <version>0.9.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/respond/
implementation 'org.webjars.npm:respond:0.9.0'
// https://jarcasting.com/artifacts/org.webjars.npm/respond/
implementation ("org.webjars.npm:respond:0.9.0")
'org.webjars.npm:respond:jar:0.9.0'
<dependency org="org.webjars.npm" name="respond" rev="0.9.0">
  <artifact name="respond" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='respond', version='0.9.0')
)
libraryDependencies += "org.webjars.npm" % "respond" % "0.9.0"
[org.webjars.npm/respond "0.9.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

Respond


node-respond is an auto-responding Async CLI/CMD wrapper for NodeJS with a syntax based on node-suppose by jprichardson (https://github.com/jprichardson/node-suppose).

Why?

After searching around for a super simple way to format a HDD in NodeJS I settled on using nodes child_proccess, but found responding to questions from the CLI an absolute nightmare of spaghetti, and so this was born!

Installation

npm install respond

It's really that easy!

Usage

Note: you can set these in any order you please.

Initiate the funtion: var respond = require('respond');

Set responses: respond.on('what to listen for', 'what to respond with') NOTE: they don't have to be in order!

Set debug: respond.debug(function(msg){ /*Handle message data*/ }) Debug reports all strings to any functions you set to it.

Set error handlers: respond.error(function(errMsg){ /*Handle Error*/ })

Set end handlers: respond.end(function(exitCode){ /*Handle End*/ })

Example

    var respond = require('respond');
    
    respond('npm', ['init'])
    .on(/name\: \([\w|\-]+\)[\s]*/, 'awesome_package')
    .on('version: (0.0.0) ', '0.0.1')
    .on('description: ',"It's an awesome package man!")
    .on('entry point: (index.js) ',"")
    .on('test command: ','npm test')
    .on('git repository: ', "")
    .on('keywords: ', 'awesome, cool')
    .on('author: ', 'Shane Gadsby')
    .on('license: (BSD) ', 'MIT')
    .on('ok? (yes) ', 'yes')
    .error(function(err){
        console.log(err.message);
    })
    .end(function(code){
        console.log('Exit code: ', code)
    })

License

(MIT License)

Copyright 2013, Shane Gadsby

Versions

Version
0.9.0