(path)
| 949 | |
| 950 | // returns [{ url, inputPath, content }] |
| 951 | getBuildTemplatesFromFilePath(path) { |
| 952 | // We can skip this for non-html files, dom-diffing will not apply |
| 953 | if(!path.endsWith(".html")) { |
| 954 | return []; |
| 955 | } |
| 956 | |
| 957 | let urls = this.getUrlsFromFilePath(path); |
| 958 | let obj = { |
| 959 | inputPath: path, |
| 960 | content: fs.readFileSync(path, "utf8"), |
| 961 | } |
| 962 | |
| 963 | return urls.map(url => { |
| 964 | return Object.assign({ url }, obj); |
| 965 | }); |
| 966 | } |
| 967 | |
| 968 | reloadFiles(files, useDomDiffingForHtml = true) { |
| 969 | if(!Array.isArray(files)) { |
no test coverage detected