[Groonga-commit] groonga/express-droonga at 8aba8cd [master] Move lib/frontend/XXX-handler.js to lib/frontend/ui/XXX.js

Back to archive index

Kouhei Sutou null+****@clear*****
Sun Jul 21 22:45:32 JST 2013


Kouhei Sutou	2013-07-21 22:45:32 +0900 (Sun, 21 Jul 2013)

  New Revision: 8aba8cd5f0f5c2dbbf4a93b906ea2282653edc1e
  https://github.com/groonga/express-droonga/commit/8aba8cd5f0f5c2dbbf4a93b906ea2282653edc1e

  Message:
    Move lib/frontend/XXX-handler.js to lib/frontend/ui/XXX.js
    
    Use "UI" instead of "handler" because "handler" is too generic. There
    was only one handler "dashboard-handler.js", It is UI.
    
    lib/frontend/dashboard-handler.js ->
    lib/frontend/ui/dashboard.js

  Modified files:
    index.js
  Renamed files:
    lib/frontend/ui/dashboard.js
      (from lib/frontend/dashboard-handler.js)

  Modified: index.js (+2 -2)
===================================================================
--- index.js    2013-07-21 22:40:19 +0900 (20bbd92)
+++ index.js    2013-07-21 22:45:32 +0900 (e74e526)
@@ -2,7 +2,7 @@ var express = require('express');
 var Connection = require('./lib/backend/connection').Connection;
 var restAPI = require('./lib/frontend/api/rest');
 var socketIoAPI = require('./lib/frontend/api/socket.io');
-var dashboardHandler = require('./lib/frontend/dashboard-handler');
+var dashboardUI = require('./lib/frontend/ui/dashboard');
 
 express.application.droonga = function(params) {
   params = params || {};
@@ -25,7 +25,7 @@ express.application.droonga = function(params) {
     });
   }
 
-  dashboardHandler.register(this, params);
+  dashboardUI.register(this, params);
 
   this.connection = connection;
   this.emitMessage = connection.emitMessage.bind(connection); // shorthand

  Renamed: lib/frontend/ui/dashboard.js (+4 -3) 73%
===================================================================
--- lib/frontend/dashboard-handler.js    2013-07-21 22:40:19 +0900 (2c7ddd6)
+++ lib/frontend/ui/dashboard.js    2013-07-21 22:45:32 +0900 (e16f3d7)
@@ -8,15 +8,16 @@ exports.register = function(application, params) {
   var prefix = params.prefix || '';
   prefix = prefix.replace(/\/$/, '');
 
+  var topDirectory = path.join(__dirname, '..', '..', '..');
   application.configure(function(){
-    application.set('views', path.join(__dirname, '..', 'views'));
+    application.set('views', path.join(topDirectory, 'views'));
     application.set('view engine', 'jade');
     application.use(prefix, express.favicon());
     application.use(prefix, express.logger('dev'));
     application.use(prefix, express.bodyParser());
     application.use(prefix, express.methodOverride());
-    application.use(prefix, less({ src: path.join(__dirname, '..', 'public') }));
-    application.use(prefix, express.static(path.join(__dirname, '..', 'public')));
+    application.use(prefix, less({ src: path.join(topDirectory, 'public') }));
+    application.use(prefix, express.static(path.join(topDirectory, 'public')));
   });
 
   application.configure('development', function() {
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index