MCPcopy Index your code
hub / github.com/ember-cli/ember-cli / setupRegistryFor

Function setupRegistryFor

tests/helpers/default-packager.js:233–257  ·  view source on GitHub ↗
(registryType, fn)

Source from the content-addressed store, hash-verified

231 * @param {Function} fn Transormation that is applied to the input tree
232 */
233function setupRegistryFor(registryType, fn) {
234 return {
235 extensionsForType(type) {
236 if (type === registryType) {
237 return ['hbs'];
238 }
239
240 return [];
241 },
242
243 load(type) {
244 if (type === registryType) {
245 return [
246 {
247 toTree() {
248 return fn.apply(this, arguments);
249 },
250 },
251 ];
252 }
253
254 return [];
255 },
256 };
257}
258
259/*
260 * Generates the object that represents an application's registry where all

Callers 6

process-test.jsFile · 0.85
styles-test.jsFile · 0.85
tests-test.jsFile · 0.85
templates-test.jsFile · 0.85
javascript-test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…