(commandOptions, rawArgs)
| 82 | beforeRun: mergeBlueprintOptions, |
| 83 | |
| 84 | async run(commandOptions, rawArgs) { |
| 85 | deprecate( |
| 86 | "Don't use `--embroider` option. Generating a new project will use the latest Vite-based embroider by default.", |
| 87 | !commandOptions.embroider, |
| 88 | DEPRECATIONS.EMBROIDER.options |
| 89 | ); |
| 90 | |
| 91 | let projectName = rawArgs[0], |
| 92 | message; |
| 93 | |
| 94 | commandOptions.name = rawArgs.shift(); |
| 95 | |
| 96 | if (!projectName || commandOptions.interactive) { |
| 97 | let answers = await this.runTask('InteractiveNew', commandOptions); |
| 98 | |
| 99 | commandOptions.blueprint = answers.blueprint; |
| 100 | |
| 101 | if (answers.name) { |
| 102 | projectName = answers.name; |
| 103 | commandOptions.name = answers.name; |
| 104 | } |
| 105 | |
| 106 | if (answers.emberData) { |
| 107 | commandOptions.emberData = answers.emberData; |
| 108 | } |
| 109 | |
| 110 | if (answers.lang) { |
| 111 | commandOptions.lang = answers.lang; |
| 112 | } |
| 113 | |
| 114 | if (answers.packageManager) { |
| 115 | commandOptions.packageManager = answers.packageManager; |
| 116 | } |
| 117 | |
| 118 | if (answers.ciProvider) { |
| 119 | commandOptions.ciProvider = answers.ciProvider; |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | if (!commandOptions.ciProvider) { |
| 124 | commandOptions.ciProvider = 'github'; |
| 125 | } |
| 126 | |
| 127 | if (commandOptions.dryRun) { |
| 128 | commandOptions.skipGit = true; |
| 129 | } |
| 130 | |
| 131 | if (projectName === '.') { |
| 132 | let blueprintName = commandOptions.blueprint === 'app' ? 'application' : commandOptions.blueprint; |
| 133 | message = `Trying to generate an ${blueprintName} structure in this directory? Use \`ember init\` instead.`; |
| 134 | |
| 135 | return Promise.reject(new SilentError(message)); |
| 136 | } |
| 137 | |
| 138 | if (!isValidProjectName(projectName)) { |
| 139 | message = `We currently do not support a name of \`${projectName}\`.`; |
| 140 | |
| 141 | return Promise.reject(new SilentError(message)); |
nothing calls this directly
no test coverage detected