@majordigital/create-acorn 1.1.0 → 1.1.1
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/bin/create-acorn.mjs +9 -11
- package/package.json +1 -1
package/bin/create-acorn.mjs
CHANGED
|
@@ -361,15 +361,7 @@ async function main() {
|
|
|
361
361
|
|
|
362
362
|
await scaffoldNextApp();
|
|
363
363
|
|
|
364
|
-
|
|
365
|
-
await setupPrismic();
|
|
366
|
-
} else {
|
|
367
|
-
console.log(`CMS preset ${selection.label} scaffolding is coming next.`);
|
|
368
|
-
console.log('This run only confirms selection for non-Prismic options.');
|
|
369
|
-
console.log('');
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
// Generate .env.example
|
|
364
|
+
// Generate .env.example and README before CMS setup (CMS setup may block if user starts Slice Machine)
|
|
373
365
|
const envExamples = {
|
|
374
366
|
prismic: `PRISMIC_ACCESS_TOKEN=
|
|
375
367
|
SITE_URL=
|
|
@@ -392,14 +384,20 @@ SITE_URL=
|
|
|
392
384
|
};
|
|
393
385
|
writeFileSync(join(process.cwd(), '.env.example'), envExamples[selection.key]);
|
|
394
386
|
console.log('.env.example generated.');
|
|
395
|
-
console.log('');
|
|
396
387
|
|
|
397
|
-
// Generate project README
|
|
398
388
|
const projectName = basename(process.cwd());
|
|
399
389
|
const readme = generateReadme(projectName, selection.key);
|
|
400
390
|
writeFileSync(join(process.cwd(), 'README.md'), readme);
|
|
401
391
|
console.log('README.md generated.');
|
|
402
392
|
console.log('');
|
|
393
|
+
|
|
394
|
+
if (selection.key === 'prismic') {
|
|
395
|
+
await setupPrismic();
|
|
396
|
+
} else {
|
|
397
|
+
console.log(`CMS preset ${selection.label} scaffolding is coming next.`);
|
|
398
|
+
console.log('This run only confirms selection for non-Prismic options.');
|
|
399
|
+
console.log('');
|
|
400
|
+
}
|
|
403
401
|
}
|
|
404
402
|
|
|
405
403
|
main().catch((err) => {
|
package/package.json
CHANGED