create-blitzpack 0.1.12 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +41 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -386,17 +386,54 @@ async function getProjectOptions(providedName, flags = {}) {
|
|
|
386
386
|
};
|
|
387
387
|
}
|
|
388
388
|
async function promptFeatureSelection() {
|
|
389
|
+
let cancelled = false;
|
|
390
|
+
const { setupType } = await prompts(
|
|
391
|
+
{
|
|
392
|
+
type: "select",
|
|
393
|
+
name: "setupType",
|
|
394
|
+
message: "Setup type:",
|
|
395
|
+
choices: [
|
|
396
|
+
{
|
|
397
|
+
title: "Recommended",
|
|
398
|
+
description: "all features included",
|
|
399
|
+
value: "recommended"
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
title: "Customize",
|
|
403
|
+
description: "choose features",
|
|
404
|
+
value: "customize"
|
|
405
|
+
}
|
|
406
|
+
],
|
|
407
|
+
initial: 0,
|
|
408
|
+
hint: "- Use arrow-keys, Enter to submit"
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
onCancel: () => {
|
|
412
|
+
cancelled = true;
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
);
|
|
416
|
+
if (cancelled) {
|
|
417
|
+
return null;
|
|
418
|
+
}
|
|
419
|
+
if (setupType === "recommended") {
|
|
420
|
+
return {
|
|
421
|
+
testing: true,
|
|
422
|
+
admin: true,
|
|
423
|
+
uploads: true
|
|
424
|
+
};
|
|
425
|
+
}
|
|
389
426
|
const featureChoices = OPTIONAL_FEATURES.map((feature) => ({
|
|
390
|
-
title:
|
|
427
|
+
title: feature.name,
|
|
428
|
+
description: feature.description,
|
|
391
429
|
value: feature.key,
|
|
392
|
-
selected:
|
|
430
|
+
selected: false
|
|
393
431
|
}));
|
|
394
|
-
let cancelled = false;
|
|
395
432
|
const { selectedFeatures } = await prompts(
|
|
396
433
|
{
|
|
397
434
|
type: "multiselect",
|
|
398
435
|
name: "selectedFeatures",
|
|
399
|
-
message: "
|
|
436
|
+
message: "Select features to include:",
|
|
400
437
|
choices: featureChoices,
|
|
401
438
|
hint: "- Space to toggle, Enter to confirm",
|
|
402
439
|
instructions: false
|