@majordigital/create-acorn 1.3.3 → 1.3.5
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 +30 -5
- package/package.json +1 -1
- package/template/tsconfig.json +2 -1
package/bin/create-acorn.mjs
CHANGED
|
@@ -396,12 +396,15 @@ This website is built using the [NextJS](https://nextjs.org/) framework, utilisi
|
|
|
396
396
|
|
|
397
397
|
2. **Set up environment variables**
|
|
398
398
|
|
|
399
|
-
|
|
399
|
+
Copy \`.env.example\` to \`.env.local\` and fill in your values:
|
|
400
400
|
|
|
401
401
|
\`\`\`env
|
|
402
|
-
NEXT_PUBLIC_STORYBLOK_ACCESS_TOKEN=your_preview_token
|
|
403
402
|
STORYBLOK_SPACE_ID=your_space_id
|
|
404
|
-
|
|
403
|
+
STORYBLOK_PREVIEW_TOKEN=your_preview_token
|
|
404
|
+
STORYBLOK_PERSONAL_ACCESS_TOKEN=your_personal_access_token
|
|
405
|
+
STORYBLOK_IS_PREVIEW=true
|
|
406
|
+
NEXT_PUBLIC_STORYBLOK_PUBLIC_TOKEN=your_public_token
|
|
407
|
+
NEXT_PUBLIC_STORYBLOK_TOKEN_VERSION=draft
|
|
405
408
|
\`\`\`
|
|
406
409
|
|
|
407
410
|
3. **Start the development server**
|
|
@@ -410,15 +413,36 @@ This website is built using the [NextJS](https://nextjs.org/) framework, utilisi
|
|
|
410
413
|
npm run dev
|
|
411
414
|
\`\`\`
|
|
412
415
|
|
|
413
|
-
The site will be available at \`
|
|
416
|
+
The site will be available at \`https://localhost:3000\` (HTTPS via self-signed certificate)
|
|
414
417
|
|
|
415
|
-
4. **
|
|
418
|
+
4. **Generate TypeScript types**
|
|
419
|
+
|
|
420
|
+
\`\`\`bash
|
|
421
|
+
npm run generate-types
|
|
422
|
+
\`\`\`
|
|
423
|
+
|
|
424
|
+
5. **Register blok components**
|
|
425
|
+
|
|
426
|
+
Add your Storyblok components to \`src/lib/storyblok/bloks.ts\`
|
|
427
|
+
|
|
428
|
+
6. **Run Storybook** (optional)
|
|
416
429
|
|
|
417
430
|
\`\`\`bash
|
|
418
431
|
npm run storybook
|
|
419
432
|
\`\`\`
|
|
420
433
|
|
|
421
434
|
Storybook will be available at \`http://localhost:6006\`
|
|
435
|
+
|
|
436
|
+
## Environment Variables 🔒
|
|
437
|
+
|
|
438
|
+
The required variables are:
|
|
439
|
+
|
|
440
|
+
- **STORYBLOK_SPACE_ID**: Your Storyblok space ID
|
|
441
|
+
- **STORYBLOK_PREVIEW_TOKEN**: Preview/draft access token from your Storyblok space settings
|
|
442
|
+
- **STORYBLOK_PERSONAL_ACCESS_TOKEN**: Personal access token from your Storyblok account
|
|
443
|
+
- **STORYBLOK_IS_PREVIEW**: Set to \`true\` for draft content, \`false\` for published
|
|
444
|
+
- **NEXT_PUBLIC_STORYBLOK_PUBLIC_TOKEN**: Public token for client-side usage
|
|
445
|
+
- **NEXT_PUBLIC_STORYBLOK_TOKEN_VERSION**: \`draft\` or \`published\`
|
|
422
446
|
`;
|
|
423
447
|
|
|
424
448
|
const dato = `
|
|
@@ -525,6 +549,7 @@ SITE_URL=
|
|
|
525
549
|
storyblok: `STORYBLOK_SPACE_ID=
|
|
526
550
|
STORYBLOK_PREVIEW_TOKEN=
|
|
527
551
|
STORYBLOK_PERSONAL_ACCESS_TOKEN=
|
|
552
|
+
STORYBLOK_IS_PREVIEW=true
|
|
528
553
|
NEXT_PUBLIC_STORYBLOK_PUBLIC_TOKEN=
|
|
529
554
|
NEXT_PUBLIC_STORYBLOK_TOKEN_VERSION="draft"
|
|
530
555
|
STORYBLOK_WEBHOOK_TOKEN=
|
package/package.json
CHANGED
package/template/tsconfig.json
CHANGED
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
|
|
46
46
|
// Next.js Project Configuration
|
|
47
|
-
"jsx": "
|
|
47
|
+
"jsx": "react-jsx",
|
|
48
48
|
"incremental": true,
|
|
49
49
|
"noEmit": true,
|
|
50
50
|
"outDir": "out",
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
"**/*.tsx",
|
|
65
65
|
".storybook/*.ts",
|
|
66
66
|
".next/types/**/*.ts",
|
|
67
|
+
".next/dev/types/**/*.ts",
|
|
67
68
|
"**/*.mts"
|
|
68
69
|
]
|
|
69
70
|
}
|