Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[doc] Rename repository from node-prompt to prompt

  • Loading branch information...
commit f47406da5fb58609ef6b03719b88f92ebd72cb1a 1 parent 79f2612
@pksunkara pksunkara authored
View
14 README.md
@@ -1,4 +1,4 @@
-# node-prompt [![Build Status](https://secure.travis-ci.org/flatiron/node-prompt.png)](http://travis-ci.org/flatiron/node-prompt)
+# prompt [![Build Status](https://secure.travis-ci.org/flatiron/prompt.png)](http://travis-ci.org/flatiron/prompt)
A beautiful command-line prompt for node.js
@@ -21,10 +21,10 @@ curl http://npmjs.org/install.sh | sh
```
## Usage
-Using node-prompt is relatively straight forward. There are two core methods you should be aware of: `prompt.get()` and `prompt.addProperties()`. There methods take strings representing property names in addition to objects for complex property validation (and more). There are a number of [examples][0] that you should examine for detailed usage.
+Using prompt is relatively straight forward. There are two core methods you should be aware of: `prompt.get()` and `prompt.addProperties()`. There methods take strings representing property names in addition to objects for complex property validation (and more). There are a number of [examples][0] that you should examine for detailed usage.
### Getting Basic Prompt Information
-Getting started with `node-prompt` is easy. Lets take a look at `examples/simple-prompt.js`:
+Getting started with `prompt` is easy. Lets take a look at `examples/simple-prompt.js`:
``` js
var prompt = require('prompt');
@@ -108,7 +108,7 @@ Command-line input received:
```
## Valid Property Settings
-`node-prompt` uses a simple property system for performing a couple of basic validation operations against input received from the command-line. The motivations here were speed and simplicity of implementation to integration of pseudo-standards like JSON-Schema were not feasible.
+`prompt` uses a simple property system for performing a couple of basic validation operations against input received from the command-line. The motivations here were speed and simplicity of implementation to integration of pseudo-standards like JSON-Schema were not feasible.
Lets examine the anatomy of a prompt property:
@@ -163,7 +163,7 @@ prompt.get(['username', 'email'], function (err, result) {
### Adding Properties to an Object
-A common use-case for prompting users for data from the command-line is to extend or create a configuration object that is passed onto the entry-point method for your CLI tool. `node-prompt` exposes a convenience method for doing just this:
+A common use-case for prompting users for data from the command-line is to extend or create a configuration object that is passed onto the entry-point method for your CLI tool. `prompt` exposes a convenience method for doing just this:
``` js
var obj = {
@@ -202,7 +202,7 @@ prompt.message + prompt.delimiter + property.message + prompt.delimiter;
The default `prompt.message` is "prompt," the default `prompt.delimiter` is
": ", and the default `property.message` is `property.name`.
Changing these allows you to customize the appearance of your prompts! In
-addition, node-prompt supports ANSI color codes via the
+addition, prompt supports ANSI color codes via the
[colors module](https://github.com/Marak/colors.js) for custom colors. For a
very colorful example:
@@ -234,5 +234,5 @@ vows test/*-test.js --spec
#### Author: [Charlie Robbins][1]
-[0]: https://github.com/flatiron/node-prompt/tree/master/examples
+[0]: https://github.com/flatiron/prompt/tree/master/examples
[1]: http://nodejitsu.com
View
4 docs/prompt.html
@@ -30,7 +30,7 @@
<span class="nx">prompt</span><span class="p">.</span><span class="nx">allowEmpty</span> <span class="o">=</span> <span class="kc">false</span><span class="p">;</span>
<span class="kd">var</span> <span class="nx">stdin</span><span class="p">,</span> <span class="nx">stdout</span><span class="p">;</span></pre></div> </td> </tr> <tr id="section-3"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-3">&#182;</a> </div> <p>Create an empty object for the properties
-known to <code>node-prompt</code></p> </td> <td class="code"> <div class="highlight"><pre><span class="nx">prompt</span><span class="p">.</span><span class="nx">properties</span> <span class="o">=</span> <span class="p">{};</span></pre></div> </td> </tr> <tr id="section-4"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-4">&#182;</a> </div> <p>Setup the default winston logger to use
+known to <code>prompt</code></p> </td> <td class="code"> <div class="highlight"><pre><span class="nx">prompt</span><span class="p">.</span><span class="nx">properties</span> <span class="o">=</span> <span class="p">{};</span></pre></div> </td> </tr> <tr id="section-4"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-4">&#182;</a> </div> <p>Setup the default winston logger to use
the <code>cli</code> levels and colors.</p> </td> <td class="code"> <div class="highlight"><pre><span class="nx">logger</span><span class="p">.</span><span class="nx">cli</span><span class="p">();</span></pre></div> </td> </tr> <tr id="section-5"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-5">&#182;</a> </div> <h3>function start (options)</h3>
<h4>@options {Object} <strong>Optional</strong> Options to consume by prompt</h4>
@@ -293,4 +293,4 @@
<span class="k">return</span> <span class="nx">prompt</span><span class="p">;</span>
<span class="p">};</span>
-</pre></div> </td> </tr> </tbody> </table> </div> </body> </html>
+</pre></div> </td> </tr> </tbody> </table> </div> </body> </html>
View
2  examples/add-properties.js
@@ -1,5 +1,5 @@
/*
- * add-properties.js: Example of how to add properties to an object using node-prompt.
+ * add-properties.js: Example of how to add properties to an object using prompt.
*
* (C) 2010, Nodejitsu Inc.
*
View
2  examples/existing-properties.js
@@ -1,5 +1,5 @@
/*
- * existing-properties.js: Example of using node-prompt with predefined properties.
+ * existing-properties.js: Example of using prompt with predefined properties.
*
* (C) 2010, Nodejitsu Inc.
*
View
2  examples/history.js
@@ -1,5 +1,5 @@
/*
- * history.js: Example of using the node-prompt history capabilities.
+ * history.js: Example of using the prompt history capabilities.
*
* (C) 2010, Nodejitsu Inc.
*
View
2  examples/password.js
@@ -1,5 +1,5 @@
/*
- * simple-prompt.js: Simple example of using node-prompt.
+ * simple-prompt.js: Simple example of using prompt.
*
* (C) 2010, Nodejitsu Inc.
*
View
2  examples/property-prompt.js
@@ -1,5 +1,5 @@
/*
- * property-prompt.js: Example of using node-prompt with complex properties.
+ * property-prompt.js: Example of using prompt with complex properties.
*
* (C) 2010, Nodejitsu Inc.
*
View
2  examples/simple-prompt.js
@@ -1,5 +1,5 @@
/*
- * simple-prompt.js: Simple example of using node-prompt.
+ * simple-prompt.js: Simple example of using prompt.
*
* (C) 2010, Nodejitsu Inc.
*
View
10 lib/prompt.js
@@ -39,7 +39,7 @@ prompt.delimiter = ': ';
//
// Create an empty object for the properties
-// known to `node-prompt`
+// known to `prompt`
//
prompt.properties = {};
@@ -259,7 +259,7 @@ prompt.getInput = function (prop, callback) {
//
// Log the resulting line, append this `property:value`
- // pair to the history for `node-prompt` and respond to
+ // pair to the history for `prompt` and respond to
// the callback.
//
logger.input(line.yellow);
@@ -378,7 +378,7 @@ prompt.readLineHidden = function (callback) {
var value = '';
//
- // Ignore errors from `.setRawMode()` so that `node-prompt` can
+ // Ignore errors from `.setRawMode()` so that `prompt` can
// be scripted in child processes.
//
try { tty.setRawMode(true) }
@@ -420,9 +420,9 @@ prompt.readLineHidden = function (callback) {
//
// ### @private function _remember (property, value)
// #### @property {Object|string} Property that the value is in response to.
-// #### @value {string} User input captured by `node-prompt`.
+// #### @value {string} User input captured by `prompt`.
// Prepends the `property:value` pair into the private `history` Array
-// for `node-prompt` so that it can be accessed later.
+// for `prompt` so that it can be accessed later.
//
prompt._remember = function (property, value) {
history.unshift({
View
2  package.json
@@ -11,7 +11,7 @@
],
"repository": {
"type": "git",
- "url": "http://github.com/flatiron/node-prompt.git"
+ "url": "http://github.com/flatiron/prompt.git"
},
"dependencies": {
"async": "0.1.x",
View
4 test/interactive-prompt-test.js
@@ -1,5 +1,5 @@
/*
- * prompt-test.js: Tests for node-prompt.
+ * prompt-test.js: Tests for prompt.
*
* (C) 2010, Nodejitsu Inc.
*
@@ -19,7 +19,7 @@ vows.describe('prompt/interactive').addBatch({
//
prompt.started = false;
prompt.start();
- winston.info('These node-prompt tests are interactive');
+ winston.info('These prompt tests are interactive');
winston.info('Not following instructions will result in test failure');
return null;
},
View
8 test/prompt-test.js
@@ -1,5 +1,5 @@
/*
- * prompt-test.js: Tests for node-prompt.
+ * prompt-test.js: Tests for prompt.
*
* (C) 2010, Nodejitsu Inc.
*
@@ -295,7 +295,7 @@ vows.describe('prompt').addBatch({
}
}
}).addBatch({
- "When using node-prompt": {
+ "When using prompt": {
"the history() method": {
"when used inside of a complex property": {
"with correct value(s)": {
@@ -326,7 +326,7 @@ vows.describe('prompt').addBatch({
}
}
}).addBatch({
- "when using node-prompt": {
+ "when using prompt": {
topic: function () {
//
// Reset the prompt for mock testing
@@ -351,7 +351,7 @@ vows.describe('prompt').addBatch({
}
}
}).addBatch({
- "when using node-prompt": {
+ "when using prompt": {
topic: function () {
//
// Reset the prompt for mock testing
Please sign in to comment.
Something went wrong with that request. Please try again.