2222 */ 
2323
2424
25- /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, 
26- maxerr: 50, browser: true */ 
25+ /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50, browser: true */ 
2726/*global $, define, brackets */ 
2827
2928define ( function  ( require ,  exports ,  module )  { 
@@ -38,26 +37,10 @@ define(function (require, exports, module) {
3837        NodeConnection        =  brackets . getModule ( "utils/NodeConnection" ) , 
3938        ProjectManager        =  brackets . getModule ( "project/ProjectManager" ) ; 
4039
41-     /** 
42-      * @const  
43-      * Amount of time to wait before automatically rejecting the connection 
44-      * deferred. If we hit this timeout, we'll never have a node connection 
45-      * for the static server in this run of Brackets. 
46-      */ 
4740    var  NODE_CONNECTION_TIMEOUT  =  5000 ;  // 5 seconds 
4841
49-     /** 
50-      * @private  
51-      * @type {jQuery.Deferred.<NodeConnection> } 
52-      * A deferred which is resolved with a NodeConnection or rejected if 
53-      * we are unable to connect to Node. 
54-      */ 
5542    var  _nodeConnectionDeferred  =  new  $ . Deferred ( ) ; 
56-     
57-     /** 
58-      * @private  
59-      * @type  {NodeConnection } 
60-      */ 
43+ 
6144    var  _nodeConnection  =  new  NodeConnection ( ) ; 
6245
6346    function  initExtension ( )  { 
@@ -82,7 +65,7 @@ define(function (require, exports, module) {
8265
8366                    _nodeConnectionDeferred . resolveWith ( null ,  [ _nodeConnection ] ) ; 
8467                } ) . fail ( 
85-                 function  ( )  {   // Failed to connect 
68+                 function  ( )  { 
8669                    console . error ( "[FileWatcher] Failed to connect to node" ,  arguments ) ; 
8770                    _nodeConnectionDeferred . reject ( ) ; 
8871                } 
@@ -94,7 +77,6 @@ define(function (require, exports, module) {
9477
9578    AppInit . htmlReady ( function  ( )  { 
9679        _nodeConnectionDeferred . done ( function  ( nodeConnection )  { 
97-             //nodeConnection.fileWatcher.startWatching(ProjectManager.getProjectRoot().fullPath, 1000); 
9880            $ ( ProjectManager ) . on ( "projectOpen" ,  function  ( )  { 
9981                _nodeConnection . domains . fileWatcher . startWatching ( ProjectManager . getProjectRoot ( ) . fullPath ) ; 
10082            } ) ; 
0 commit comments