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

Function _locals

lib/models/blueprint.js:1032–1057  ·  view source on GitHub ↗

@private @method _locals @param {Object} options @return {Object}

(options)

Source from the content-addressed store, hash-verified

1030 @return {Object}
1031 */
1032 _locals(options) {
1033 let packageName = options.project.name();
1034 let moduleName = (options.entity && options.entity.name) || packageName;
1035 let sanitizedModuleName = moduleName.replace(/\//g, '-');
1036
1037 return new Promise((resolve) => {
1038 resolve(this.locals(options));
1039 }).then((customLocals) => {
1040 let fileMapVariables = this._generateFileMapVariables(moduleName, customLocals, options);
1041 let fileMap = this.generateFileMap(fileMapVariables);
1042 let standardLocals = {
1043 dasherizedPackageName: stringUtils.dasherize(packageName),
1044 classifiedPackageName: stringUtils.classify(packageName),
1045 dasherizedModuleName: stringUtils.dasherize(moduleName),
1046 classifiedModuleName: stringUtils.classify(sanitizedModuleName),
1047 camelizedModuleName: stringUtils.camelize(sanitizedModuleName),
1048 decamelizedModuleName: stringUtils.decamelize(sanitizedModuleName),
1049 fileMap,
1050 hasPathToken: this.hasPathToken,
1051 targetFiles: options.targetFiles,
1052 rawArgs: options.rawArgs,
1053 };
1054
1055 return merge({}, standardLocals, customLocals);
1056 });
1057 },
1058
1059 /**
1060 Used to add a package to the project's `package.json`.

Callers

nothing calls this directly

Calls 2

nameMethod · 0.45
thenMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…