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

Method run

lib/tasks/install-blueprint.js:20–53  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

18
19class InstallBlueprintTask extends Task {
20 async run(options) {
21 let cwd = process.cwd();
22 let name = options.rawName;
23 let blueprintOption = options.blueprint;
24 // If we're in a dry run, pretend we changed directories.
25 // Pretending we cd'd avoids prompts in the actual current directory.
26 let fakeCwd = path.join(cwd, name);
27 let target = options.dryRun ? fakeCwd : cwd;
28
29 let installOptions = {
30 target,
31 entity: { name },
32 ui: this.ui,
33 project: this.project,
34 dryRun: options.dryRun,
35 targetFiles: options.targetFiles,
36 rawArgs: options.rawArgs,
37 ciProvider: options.ciProvider,
38 };
39
40 installOptions = merge(installOptions, options || {});
41
42 let blueprint = await this._resolveBlueprint(blueprintOption);
43 logger.info(`Installing blueprint into "${target}" ...`);
44 await blueprint.install(installOptions);
45
46 if (options.lintFix) {
47 try {
48 await lintFix.run(this.project);
49 } catch (error) {
50 logger.error('Lint fix failed: %o', error);
51 }
52 }
53 }
54
55 async _resolveBlueprint(name) {
56 name = name || 'app';

Callers

nothing calls this directly

Calls 1

_resolveBlueprintMethod · 0.95

Tested by

no test coverage detected