lib/application.js
function watchPartial(path, callback) {
  
  // Don't watch partials again when reloading
  
  if (this.watchPartials && RELOADING === false) {
    
    var self = this;
    self.debug('Watching Partial for changes: %s', self.relPath(path, 'app/views'));
    
    var watcher = chokidar.watch(path, {interval: self.config.watchInterval || 100});
    
    watcher.on('change', function() {
      self.debug("Regeneraging view partial", self.relPath(path));
      callback.call(self, path);
    });
    
    watcher.on('unlink', function() {
      self.log(util.format("Stopped watching partial '%s' (renamed)", self.relPath(path)));
      watcher.close();
    });
    
    watcher.on('error', function(err) {
      self.log(util.format("Stopped watching partial '%s' (error)", self.relPath(path)));
      self.log(err.stack);
      watcher.close();
    });

  }

}
function watchPartial(path, callback) {
  
  // Don't watch partials again when reloading
  
  if (this.watchPartials && RELOADING === false) {
    
    var self = this;
    self.debug('Watching Partial for changes: %s', self.relPath(path, 'app/views'));
    
    var watcher = chokidar.watch(path, {interval: self.config.watchInterval || 100});
    
    watcher.on('change', function() {
      self.debug("Regeneraging view partial", self.relPath(path));
      callback.call(self, path);
    });
    
    watcher.on('unlink', function() {
      self.log(util.format("Stopped watching partial '%s' (renamed)", self.relPath(path)));
      watcher.close();
    });
    
    watcher.on('error', function(err) {
      self.log(util.format("Stopped watching partial '%s' (error)", self.relPath(path)));
      self.log(err.stack);
      watcher.close();
    });

  }

}
function watchPartial ( path , callback ) { // Don't watch partials again when reloading if ( this . watchPartials && RELOADING === false ) { var self = this ; self . debug ( 'Watching Partial for changes: %s' , self . relPath ( path , 'app/views' ) ) ; var watcher = chokidar . watch ( path , { interval : self . config . watchInterval || 100 } ) ; watcher . on ( 'change' , function ( ) { self . debug ( "Regeneraging view partial" , self . relPath ( path ) ) ; callback . call ( self , path ) ; } ) ; watcher . on ( 'unlink' , function ( ) { self . log ( util . format ( "Stopped watching partial '%s' (renamed)" , self . relPath ( path ) ) ) ; watcher . close ( ) ; } ) ; watcher . on ( 'error' , function ( err ) { self . log ( util . format ( "Stopped watching partial '%s' (error)" , self . relPath ( path ) ) ) ; self . log ( err . stack ) ; watcher . close ( ) ; } ) ; } }
Watches a view Partial for changes
Watches a view Partial for changes