Skip to content

Commit a4d438e

Browse files
author
Kelly Selden
committed
destructure options
1 parent f81ee3a commit a4d438e

1 file changed

Lines changed: 17 additions & 13 deletions

File tree

src/get-start-and-end-commands.js

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -194,44 +194,48 @@ async function runEmberRemotely({
194194
function createProject(runEmber) {
195195
return ({
196196
packageRoot,
197-
options
197+
options: {
198+
projectName,
199+
baseBlueprint,
200+
blueprint
201+
}
198202
}) => {
199203
return async function createProject(cwd) {
200-
if (!options.blueprint || !options.blueprint.isBaseBlueprint) {
204+
if (!blueprint || !blueprint.isBaseBlueprint) {
201205
await runEmber({
202206
packageRoot,
203207
cwd,
204-
projectName: options.projectName,
205-
blueprint: options.baseBlueprint
208+
projectName,
209+
blueprint: baseBlueprint
206210
});
207211
}
208212

209-
if (options.blueprint) {
210-
if (await isDefaultAddonBlueprint(options.blueprint)) {
213+
if (blueprint) {
214+
if (await isDefaultAddonBlueprint(blueprint)) {
211215
await module.exports.installAddonBlueprint({
212216
cwd,
213-
projectName: options.projectName,
214-
blueprint: options.blueprint
217+
projectName,
218+
blueprint
215219
});
216220
} else {
217221
await runEmber({
218222
packageRoot,
219223
cwd,
220-
projectName: options.projectName,
221-
blueprint: options.blueprint
224+
projectName,
225+
blueprint
222226
});
223227
}
224228
}
225229

226-
if (!(options.blueprint && isDefaultBlueprint(options.blueprint))) {
230+
if (!(blueprint && isDefaultBlueprint(blueprint))) {
227231
// This might not be needed anymore.
228232
await module.exports.appendNodeModulesIgnore({
229233
cwd,
230-
projectName: options.projectName
234+
projectName
231235
});
232236
}
233237

234-
return path.join(cwd, options.projectName);
238+
return path.join(cwd, projectName);
235239
};
236240
};
237241
}

0 commit comments

Comments
 (0)