ripple-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject [1/3] incubator-ripple git commit: Look up cordova prepare when creating middleware.
Date Wed, 15 Jul 2015 01:19:13 GMT
Repository: incubator-ripple
Updated Branches:
  refs/heads/master f6a538dc4 -> ba38300b0


Look up cordova prepare when creating middleware.

Instead of at the module load time.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ripple/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ripple/commit/adc76f25
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ripple/tree/adc76f25
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ripple/diff/adc76f25

Branch: refs/heads/master
Commit: adc76f259db5d18d61707a50a455b455c662f6ea
Parents: f6a538d
Author: Arzhan Kinzhalin <arzhan.i.kinzhalin@intel.com>
Authored: Tue Jun 30 19:51:14 2015 -0300
Committer: Tim Barham <tim.barham@microsoft.com>
Committed: Wed Jul 15 10:49:20 2015 +1000

----------------------------------------------------------------------
 lib/server/emulate/cordovaPrepare.js | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/adc76f25/lib/server/emulate/cordovaPrepare.js
----------------------------------------------------------------------
diff --git a/lib/server/emulate/cordovaPrepare.js b/lib/server/emulate/cordovaPrepare.js
index d4e526a..d7eb982 100644
--- a/lib/server/emulate/cordovaPrepare.js
+++ b/lib/server/emulate/cordovaPrepare.js
@@ -20,18 +20,19 @@
  */
 "use strict";
 
-var exec = require('child_process').exec,
-    cordovaPrepare;
-
-try {
-    cordovaPrepare = require.resolve('cordova') ? require('cordova/src/prepare') : null;
-} catch (e) {
-    console.log('INFO: '.green +
-                'Could not find cordova as a local module. Expecting to find it installed
globally.');
-}
+var exec = require('child_process').exec;
 
 module.exports = {
     refresh: function () {
+        var cordovaPrepare;
+
+        try {
+            cordovaPrepare = require.resolve('cordova') ? require('cordova/src/prepare')
: null;
+        } catch (e) {
+            console.log('INFO: '.green +
+                        'Could not find cordova as a local module. Expecting to find it installed
globally.');
+        }
+
         return function (req, res /*, next */) {
 
             var callback = function (err) {


Mime
View raw message