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

Function mapFile

lib/models/blueprint.js:973–982  ·  view source on GitHub ↗

@method mapFile @param {String} file @param locals @return {String}

(file, locals)

Source from the content-addressed store, hash-verified

971 @return {String}
972 */
973 mapFile(file, locals) {
974 let pattern, i;
975 let fileMap = locals.fileMap || { __name__: locals.dasherizedModuleName };
976 file = Blueprint.renamedFiles[file] || file;
977 for (i in fileMap) {
978 pattern = new RegExp(i, 'g');
979 file = file.replace(pattern, fileMap[i]);
980 }
981 return file;
982 },
983
984 /**
985 Looks for a __root__ token in the files folder. Must be present for

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…