* Whether a CFML `imports` name is the path of a template an include names * (`formlistshared.cfm`, `../shared/helpers.cfm`, `/app/x.cfm`), not a * cfscript `import com.foo.Bar;` or `import "java:…";` (#2651).
(name: string)
| 5201 | * cfscript `import com.foo.Bar;` or `import "java:…";` (#2651). |
| 5202 | */ |
| 5203 | function isCfmlTemplatePath(name: string): boolean { |
| 5204 | return !name.includes(':') && (name.includes('/') || name.includes('\\') || /\.(?:cfml?|cfc|cfs)$/i.test(name.trim())); |
| 5205 | } |
| 5206 | |
| 5207 | /** The project-relative directory holding `p` ('' for the project root). */ |
| 5208 | function goDirOf(p: string): string { |