@majordigital/create-acorn 1.1.1 → 1.1.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/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # @majordigital/create-acorn
2
2
 
3
- Interactive CLI to scaffold a Next.js 15 project with a headless CMS and Acorn components.
3
+ **Create Acorn** is Major Digital's production-ready scaffolding CLI for building headless CMS websites with Next.js 15 and the Acorn component system.
4
+
5
+ It eliminates the repetitive setup that comes with every new project — framework configuration, CMS integration, linting, commit conventions, and a full UI component library — so your team can skip straight to building.
4
6
 
5
7
  ## Quick Start
6
8
 
@@ -8,50 +10,78 @@ Interactive CLI to scaffold a Next.js 15 project with a headless CMS and Acorn c
8
10
  npx @majordigital/create-acorn@latest
9
11
  ```
10
12
 
11
- The CLI will walk you through selecting a CMS (Prismic, Storyblok, or Dato) and scaffold a Next.js 15 project with TypeScript, Tailwind, and Biome.
13
+ The CLI walks you through selecting a headless CMS and scaffolds a complete, opinionated project in seconds.
14
+
15
+ ## What's Inside
12
16
 
13
- ## What You Get
17
+ Every Acorn project ships with a carefully curated stack:
14
18
 
15
- The CLI scaffolds a complete project with:
19
+ - **Next.js 15** App Router, TypeScript, Tailwind CSS, and Turbopack
20
+ - **Acorn Component Library** — A battle-tested set of UI primitives, layout systems, and page sections built for Major Digital's design language
21
+ - **Headless CMS Integration** — First-class support for Prismic, Storyblok, and DatoCMS with pre-configured SDKs and environment templates
22
+ - **Biome** — Fast, unified linting and formatting with custom rules for React, Next.js, and Tailwind class sorting
23
+ - **Lefthook + Commitlint** — Pre-commit quality gates and conventional commit enforcement out of the box
24
+ - **SVG-as-components** — Inline SVG imports via `@svgr/webpack` for both Webpack and Turbopack
25
+ - **Bundle Analysis** — `@next/bundle-analyzer` ready to go with `ANALYZE=true`
16
26
 
17
- - **Next.js 15** with App Router, TypeScript, and Tailwind
18
- - **Acorn component library** — UI elements, layout components, sections, forms, typography, and navigation
19
- - **Biome** for linting and formatting
20
- - **Your chosen CMS** pre-configured
27
+ ## Acorn Component Architecture
21
28
 
22
- ### Included Acorn Boilerplate
29
+ The Acorn library follows a layered component hierarchy designed for consistency and reuse across projects:
23
30
 
24
31
  ```
25
32
  src/
26
- ├── app/ # Next.js app routes (layout, page, not-found, robots, sitemap)
27
- ├── icons/ # SVG icons
28
- ├── lib/ # Utilities, fonts, config, metadata helpers
29
- ├── styles/ # Global CSS
30
- ├── types/ # TypeScript type definitions
33
+ ├── app/ # Next.js App Router (layout, pages, not-found, robots, sitemap)
34
+ ├── icons/ # SVG assets imported as React components
35
+ ├── lib/ # Utilities, fonts, config, metadata helpers, caching
36
+ ├── styles/ # Global CSS and Tailwind directives
37
+ ├── types/ # TypeScript definitions and SVG module declarations
31
38
  └── ui/
32
- ├── components/ # Nav, Card, Accordion, CTA, Quote, Form, etc.
33
- ├── elements/ # Button, Chip, Tooltip, typography, form inputs
34
- ├── layout/ # Container, PageSection
35
- └── sections/ # Header, Footer
39
+ ├── elements/ # Atomic building blocks (Button, Chip, Tooltip, form inputs, typography)
40
+ ├── components/ # Composed features (Nav, Card, Accordion, CTA, Quote, ContactForm)
41
+ ├── layout/ # Structural wrappers (Container, PageSection)
42
+ └── sections/ # Full-width page regions (Header, Footer)
36
43
  ```
37
44
 
45
+ ## Supported CMS Platforms
46
+
47
+ | CMS | Status | Setup |
48
+ |-----|--------|-------|
49
+ | **Prismic** | Full integration | Slice Machine init, repository connection, slicemachine script |
50
+ | **Storyblok** | Scaffolding ready | Environment template, component generation support |
51
+ | **DatoCMS** | Scaffolding ready | Environment template, API token configuration |
52
+
38
53
  ## Non-Interactive Usage
39
54
 
55
+ For CI pipelines or scripted setups:
56
+
40
57
  ```bash
41
58
  npx @majordigital/create-acorn@latest --cms prismic --repo my-repo
42
59
  npx @majordigital/create-acorn@latest --cms storyblok
43
60
  npx @majordigital/create-acorn@latest --cms dato
44
61
  ```
45
62
 
46
- ## Prismic Setup
63
+ ## Generated Project Files
64
+
65
+ Beyond the component library, every scaffold includes:
66
+
67
+ | File | Purpose |
68
+ |------|---------|
69
+ | `biome.jsonc` | Linting, formatting, and import organisation rules |
70
+ | `lefthook.yml` | Pre-commit checks and commit message validation |
71
+ | `commitlint.config.ts` | Conventional commit enforcement |
72
+ | `next.config.ts` | SVG loader, bundle analyser, image remote patterns |
73
+ | `postcss.config.js` | Tailwind CSS and Autoprefixer |
74
+ | `tsconfig.json` | TypeScript with `@/*` path aliases |
75
+ | `.env.example` | CMS-specific environment variable template |
76
+ | `.npmrc` | Legacy peer deps for React 19 compatibility |
77
+ | `README.md` | Project-specific documentation based on CMS choice |
78
+
79
+ ## npm
47
80
 
48
- If you select Prismic, the CLI runs Slice Machine init and connects to your new or existing repository.
81
+ [![npm version](https://img.shields.io/npm/v/@majordigital/create-acorn)](https://www.npmjs.com/package/@majordigital/create-acorn)
49
82
 
50
- Repository name rules: lowercase letters, numbers, and hyphens only.
83
+ Published at [@majordigital/create-acorn](https://www.npmjs.com/package/@majordigital/create-acorn)
51
84
 
52
- After setup:
85
+ ## Changelog
53
86
 
54
- 1. Start Slice Machine: `npm run slicemachine`
55
- 2. Create your custom types at http://localhost:9999
56
- 3. Push your custom types to Prismic
57
- 4. Start your dev server: `npm run dev`
87
+ See [CHANGELOG.md](CHANGELOG.md) for a full release history.
@@ -91,7 +91,9 @@ async function scaffoldNextApp() {
91
91
  '--app',
92
92
  '--src-dir',
93
93
  '--import-alias', '@/*',
94
- '--use-npm'
94
+ '--use-npm',
95
+ '--turbopack',
96
+ '--yes'
95
97
  ]);
96
98
  console.log('');
97
99
  console.log('Next.js project scaffolded successfully.');
@@ -122,7 +124,8 @@ async function scaffoldNextApp() {
122
124
  'react-accessible-accordion', 'react-hook-form', 'zod'
123
125
  ]);
124
126
  await runCommand('npm', ['install', '--save-dev', '--legacy-peer-deps',
125
- '@svgr/webpack', '@types/lodash.get'
127
+ '@svgr/webpack', '@types/lodash.get',
128
+ 'tailwindcss@^3.4.10', 'autoprefixer', 'postcss'
126
129
  ]);
127
130
  console.log('Acorn dependencies installed.');
128
131
  console.log('');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@majordigital/create-acorn",
3
- "version": "1.1.1",
3
+ "version": "1.1.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",
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "repository": {
17
17
  "type": "git",
18
- "url": "git+https://github.com/MajorDigital/majordigital-acorn.git"
18
+ "url": "git+https://github.com/MajorDigital/create-acorn.git"
19
19
  },
20
20
  "files": [
21
21
  "bin",