(p)
| 167 | // private |
| 168 | |
| 169 | function selectEngine(p) { |
| 170 | var codePath = path.dirname(p); // remove the file name or child directory in recursive call |
| 171 | var engine = ss.client.templateEngines[codePath]; |
| 172 | |
| 173 | if (engine) { |
| 174 | return engine; |
| 175 | } |
| 176 | if (codePath !== '.') { |
| 177 | return selectEngine(codePath || '.'); |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | function wrapTemplate(template, pth, logicPath, opts, options, engine, prevEngine) { |
| 182 | var output; |