[Groonga-commit] groonga/gcs [master] Add "resolve" class method to CommandLineInterface

Back to archive index

null+****@clear***** null+****@clear*****
2012年 8月 9日 (木) 14:59:08 JST


SHIMODA Hiroshi	2012-08-09 14:59:08 +0900 (Thu, 09 Aug 2012)

  New Revision: b8c83a3b9144ab73f67780224151d0d827763747
  https://github.com/groonga/gcs/commit/b8c83a3b9144ab73f67780224151d0d827763747

  Log:
    Add "resolve" class method to CommandLineInterface

  Modified files:
    lib/command-line.js

  Modified: lib/command-line.js (+5 -0)
===================================================================
--- lib/command-line.js    2012-08-09 14:40:28 +0900 (dc6bd48)
+++ lib/command-line.js    2012-08-09 14:59:08 +0900 (241e135)
@@ -2,6 +2,7 @@ var program = require('commander');
 var nroonga = require('./wrapped-nroonga');
 var Domain = require('./database/domain').Domain;
 var version = require('../package').version;
+var path = require('path');
 
 var defaultDatabasePath =
       exports.defaultDatabasePath =
@@ -87,4 +88,8 @@ CommandLineInterface.prototype = {
 };
 exports.CommandLineInterface = CommandLineInterface;
 
+CommandLineInterface.resolve = function(path) {
+  return path.resolve(process.cwd(), path);
+};
+
 exports.Domain = CommandLineInterface.Domain = Domain;
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
Download 



Groonga-commit メーリングリストの案内
Back to archive index