MCPcopy Create free account
hub / github.com/ember-cli/ember-cli / buildFileInfo

Function buildFileInfo

packages/app-blueprint/index.js:150–176  ·  view source on GitHub ↗

* @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)

Source from the content-addressed store, hash-verified

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};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…