(url)
| 189 | } |
| 190 | |
| 191 | matchPassthroughAlias(url) { |
| 192 | let aliases = Object.assign({}, this.options.aliases, this.passthroughAliases); |
| 193 | for(let targetUrl in aliases) { |
| 194 | if(!targetUrl) { |
| 195 | continue; |
| 196 | } |
| 197 | |
| 198 | let file = aliases[targetUrl]; |
| 199 | if(url.startsWith(targetUrl)) { |
| 200 | let inputDirectoryPath = file + url.slice(targetUrl.length); |
| 201 | |
| 202 | // e.g. addPassthroughCopy("img/") but <img src="/img/built/IdthKOzqFA-350.png"> |
| 203 | // generated by the image plugin (written to the output folder) |
| 204 | // If they do not exist in the input directory, this will fallback to the output directory. |
| 205 | if(fs.existsSync(inputDirectoryPath)) { |
| 206 | return inputDirectoryPath; |
| 207 | } |
| 208 | } |
| 209 | } |
| 210 | return false; |
| 211 | } |
| 212 | |
| 213 | isFileInDirectory(dir, file) { |
| 214 | let absoluteDir = TemplatePath.absolutePath(dir); |
no outgoing calls
no test coverage detected