* @override * * This modification of buildFileInfo allows our differing * input files to output to a single file, depending on the options. * For example: * * for javascript, * _ts_eslint.config.mjs is deleted * _js_eslint.config.mjs is renamed to eslint.config.mjs
(intoDir, templateVariables, file, options)
| 148 | * _ts_eslint.config.mjs is renamed to eslint.config.mjs |
| 149 | */ |
| 150 | buildFileInfo(intoDir, templateVariables, file, options) { |
| 151 | let fileInfo = this._super.buildFileInfo.apply(this, arguments); |
| 152 | |
| 153 | if (file.includes('_js_')) { |
| 154 | if (options.typescript) { |
| 155 | return null; |
| 156 | } |
| 157 | |
| 158 | fileInfo.outputBasePath = fileInfo.outputPath.replace('_js_', ''); |
| 159 | fileInfo.outputPath = fileInfo.outputPath.replace('_js_', ''); |
| 160 | fileInfo.displayPath = fileInfo.outputPath.replace('_js_', ''); |
| 161 | return fileInfo; |
| 162 | } |
| 163 | |
| 164 | if (file.includes('_ts_')) { |
| 165 | if (!options.typescript) { |
| 166 | return null; |
| 167 | } |
| 168 | |
| 169 | fileInfo.outputBasePath = fileInfo.outputPath.replace('_ts_', ''); |
| 170 | fileInfo.outputPath = fileInfo.outputPath.replace('_ts_', ''); |
| 171 | fileInfo.displayPath = fileInfo.outputPath.replace('_ts_', ''); |
| 172 | return fileInfo; |
| 173 | } |
| 174 | |
| 175 | return fileInfo; |
| 176 | }, |
| 177 | }; |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…