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

Function getAllBlueprints

lib/commands/generate.js:102–139  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

100 },
101
102 getAllBlueprints(options) {
103 let lookupPaths = this.project.blueprintLookupPaths();
104 let blueprintList = Blueprint.list({ paths: lookupPaths });
105
106 let output = '';
107
108 let singleBlueprintName;
109 if (options.rawArgs) {
110 singleBlueprintName = options.rawArgs[0];
111 }
112
113 if (!singleBlueprintName && !options.json) {
114 output += `${EOL} Available blueprints:${EOL}`;
115 }
116
117 let collectionsJson = [];
118
119 blueprintList.forEach(function (collection) {
120 let result = this.getPackageBlueprints(collection, options, singleBlueprintName);
121 if (options.json) {
122 let collectionJson = {};
123 collectionJson[collection.source] = result;
124 collectionsJson.push(collectionJson);
125 } else {
126 output += result;
127 }
128 }, this);
129
130 if (singleBlueprintName && !output && !options.json) {
131 output = chalk.yellow(`The '${singleBlueprintName}' blueprint does not exist in this project.`) + EOL;
132 }
133
134 if (options.json) {
135 return collectionsJson;
136 } else {
137 return output;
138 }
139 },
140
141 getPackageBlueprints(collection, options, singleBlueprintName) {
142 let verbose = options.verbose;

Callers

nothing calls this directly

Calls 1

blueprintLookupPathsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…