@majordigital/create-acorn 1.5.0 → 1.5.2
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 +12 -6
- package/package.json +2 -1
package/bin/create-acorn.mjs
CHANGED
|
@@ -362,15 +362,21 @@ async function setupDato(projectName) {
|
|
|
362
362
|
|
|
363
363
|
if (!isExisting) {
|
|
364
364
|
console.log('');
|
|
365
|
-
console.log('
|
|
366
|
-
console.log('
|
|
365
|
+
console.log('NOTE: DatoCMS does not support creating projects via CLI or API.');
|
|
366
|
+
console.log('You need to create the project manually first:');
|
|
367
367
|
console.log('');
|
|
368
|
-
console.log('
|
|
369
|
-
console.log('
|
|
368
|
+
console.log(' 1. Go to https://www.datocms.com/dashboard');
|
|
369
|
+
console.log(' 2. Click "New Project" and create your project');
|
|
370
|
+
console.log(' 3. Go to Settings > API Tokens > Full-access API token');
|
|
371
|
+
console.log(' 4. Copy the token and paste it below');
|
|
372
|
+
console.log('');
|
|
373
|
+
console.log('If you provide the token, we will automatically scaffold all models');
|
|
374
|
+
console.log('(Page, Hero, Button, Layout, etc.) in your DatoCMS project.');
|
|
370
375
|
console.log('');
|
|
371
376
|
} else {
|
|
372
377
|
console.log('');
|
|
373
|
-
console.log('Great!
|
|
378
|
+
console.log('Great! We can automatically scaffold all models in your project.');
|
|
379
|
+
console.log('Grab your Full-access API token from:');
|
|
374
380
|
console.log(' Settings > API Tokens > Full-access API token');
|
|
375
381
|
console.log('');
|
|
376
382
|
}
|
|
@@ -395,7 +401,7 @@ async function setupDato(projectName) {
|
|
|
395
401
|
const client = buildClient({ apiToken });
|
|
396
402
|
const tokens = await client.accessTokens.list();
|
|
397
403
|
const readOnly = tokens.find(t => t.name === 'Read-only API token');
|
|
398
|
-
if (readOnly
|
|
404
|
+
if (readOnly?.token) {
|
|
399
405
|
cdaToken = readOnly.token;
|
|
400
406
|
}
|
|
401
407
|
} catch {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@majordigital/create-acorn",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.2",
|
|
4
4
|
"description": "Interactive scaffold for Acorn with Storyblok/Prismic/DatoCMS, TypeScript, and Tailwind.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"create-acorn": "bin/create-acorn.mjs",
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"slicemachine": "start-slicemachine"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
+
"@datocms/cma-client-node": "^3.0.0",
|
|
40
41
|
"@headlessui/react": "^2.2.3",
|
|
41
42
|
"@headlessui/tailwindcss": "^0.2.2",
|
|
42
43
|
"@heroicons/react": "^2.2.0",
|