code: function selectEngine(p) {
      var codePath = path.dirname(p); // remove the file name or child directory in recursive call
      var engine = ss.client.templateEngines[codePath];
  
      if (engine) {
        return engine;
      }
      if (codePath !== '.') {
        return selectEngine(codePath || '.');
      }
    }
docs: private