(relPath: string)
| 10 | * @param relPath file path relative to the /templates directory under root. |
| 11 | */ |
| 12 | export function absoluteTemplateFilePath(relPath: string): string { |
| 13 | if (isVSCodeExtension()) { |
| 14 | // In the VSCE, the /templates directory is copied into dist, which makes it |
| 15 | // right next to the compiled files (from various sources including this |
| 16 | // TS file). See CopyPlugin in `../firebase-vscode/webpack.common.js`. |
| 17 | return resolve(__dirname, "templates", relPath); |
| 18 | } |
| 19 | // Otherwise, the /templates directory is one level above /src or /lib. |
| 20 | return resolve(__dirname, "../templates", relPath); |
| 21 | } |
| 22 | |
| 23 | /** |
| 24 | * Read a template file synchronously. |
no test coverage detected
searching dependent graphs…