[Groonga-commit] droonga/droonga-http-server at 6c9896a [master] Use promptly instead of commander.

アーカイブの一覧に戻る

YUKI Hiroshi null+****@clear*****
Thu Sep 18 19:19:41 JST 2014


YUKI Hiroshi	2014-09-18 19:19:41 +0900 (Thu, 18 Sep 2014)

  New Revision: 6c9896aa73553d6406b828fd1215c4ab3266942a
  https://github.com/droonga/droonga-http-server/commit/6c9896aa73553d6406b828fd1215c4ab3266942a

  Message:
    Use promptly instead of commander.
    
    "prompt" and "confirm" are moved to promptly.

  Modified files:
    bin/droonga-http-server-configure
    package.json

  Modified: bin/droonga-http-server-configure (+5 -5)
===================================================================
--- bin/droonga-http-server-configure    2014-09-18 19:09:42 +0900 (919171d)
+++ bin/droonga-http-server-configure    2014-09-18 19:19:41 +0900 (350bab2)
@@ -1,7 +1,7 @@
 #!/usr/bin/env node
 // -*- js -*-
 
-var commander = require('commander'),
+var promptly  = require('promptly'),
     exec      = require('child_process').exec,
     fs        = require('fs'),
     path      = require('path'),
@@ -73,7 +73,7 @@ function ensureServiceStopped(callback) {
 
   console.log('The droonga-http-server service is now running.');
   console.log('Before reconfiguration, the service is going to be stopped.');
-  commander.confirm('Are you sure you want to continue reconfiguration?', function(ok) {
+  promptly.confirm('Are you sure you want to continue reconfiguration?', function(ok) {
     if (!ok)
       return process.exit(false);
 
@@ -130,7 +130,7 @@ function configFileExists() {
 
 function confirmToReconfigure(callback) {
   if (!options.quiet && !options.resetConfig) {
-    commander.confirm('Do you want the configuration file ' +
+    promptly.confirm('Do you want the configuration file ' +
                         '\"droonga-http-server.yaml\" to be regenerated?',
                       function(ok) {
                         options.resetConfig = ok;
@@ -143,7 +143,7 @@ function confirmToReconfigure(callback) {
 }
 
 function input(message, defaultValue, callback) {
-  commander.prompt(message,
+  promptly.prompt(message,
                   function(value) {
                     value = value.trim();
                     if (value === '')
@@ -174,7 +174,7 @@ function setBoolean(name, message, callback) {
     callback();
   }
   else {
-    commander.confirm(message, function(ok) {
+    promptly.confirm(message, function(ok) {
       configValues[name] = ok;
       callback();
     });

  Modified: package.json (+1 -0)
===================================================================
--- package.json    2014-09-18 19:09:42 +0900 (5c32d2b)
+++ package.json    2014-09-18 19:19:41 +0900 (b410e58)
@@ -27,6 +27,7 @@
     "express-session": "*",
     "js-yaml": "*",
     "morgan": "*",
+    "promptly": "*",
     "ps-node": "*",
     "response-time": "*",
     "touch": "*",
-------------- next part --------------
HTML����������������������������...
ダウンロード 



More information about the Groonga-commit mailing list
アーカイブの一覧に戻る