create-esa-stack 0.1.8 → 0.1.10
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/CHANGELOG.md +45 -9
- package/README.md +56 -25
- package/dist/cli.js +29 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,15 +5,51 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
## [
|
|
9
|
-
|
|
10
|
-
###
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
-
|
|
8
|
+
## [0.1.10] - 2026-01-24
|
|
9
|
+
|
|
10
|
+
### Docs
|
|
11
|
+
- Comprehensive documentation update in README and CHANGELOG.
|
|
12
|
+
|
|
13
|
+
## [0.1.9] - 2026-01-24
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
- **Storybook**: Added support for Storybook component development environment.
|
|
17
|
+
- **Smart Testing Configuration**: Automatically skips separate testing tools setup if Storybook is used (since it includes testing infrastructure).
|
|
18
|
+
|
|
19
|
+
## [0.1.8] - 2026-01-24
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
- **Testing Tools**: Added optional installation for Vitest and React Testing Library.
|
|
23
|
+
|
|
24
|
+
## [0.1.7] - 2026-01-24
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
- **Supabase**: Added optional integration for Supabase (Auth, Database, Realtime). Installs `@supabase/supabase-js`, `@supabase/ssr` and CLI.
|
|
28
|
+
|
|
29
|
+
## [0.1.6] - 2026-01-24
|
|
30
|
+
|
|
31
|
+
### Added
|
|
32
|
+
- **React Email**: Added optional integration for React Email, including preview server and components.
|
|
33
|
+
|
|
34
|
+
## [0.1.5] - 2026-01-24
|
|
35
|
+
|
|
36
|
+
### Added
|
|
37
|
+
- **Resend**: Added optional integration for Resend transactional emails.
|
|
38
|
+
|
|
39
|
+
## [0.1.4] - 2026-01-24
|
|
40
|
+
|
|
41
|
+
### Added
|
|
42
|
+
- **@next/third-parties**: Added optional support for optimized third-party scripts (Google Analytics, GTM, etc).
|
|
43
|
+
|
|
44
|
+
## [0.1.3] - 2026-01-24
|
|
45
|
+
|
|
46
|
+
### Added
|
|
47
|
+
- **TanStack Query**: Added optional integration for server-state management.
|
|
48
|
+
|
|
49
|
+
## [0.1.2] - 2026-01-24
|
|
50
|
+
|
|
51
|
+
### Added
|
|
52
|
+
- **shadcn/ui**: Added optional integration for shadcn/ui component library.
|
|
17
53
|
|
|
18
54
|
## [0.1.0] - 2026-01-22
|
|
19
55
|
|
package/README.md
CHANGED
|
@@ -1,49 +1,82 @@
|
|
|
1
1
|
# create-esa-stack
|
|
2
2
|
|
|
3
|
-
A CLI tool to quickly scaffold Next.js projects with ESA's preferred tech stack.
|
|
3
|
+
A CLI tool to quickly scaffold Next.js projects with ESA's preferred tech stack.
|
|
4
|
+
|
|
5
|
+
> **Opinionated but flexible.** Starts with a robust modern foundation, then lets you pick exactly the extras you need.
|
|
4
6
|
|
|
5
7
|
## Features
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
Every project is created with a solid baseline:
|
|
8
10
|
|
|
9
11
|
- ✅ **Next.js** - React framework with App Router
|
|
10
12
|
- ✅ **TypeScript** - Type-safe JavaScript
|
|
11
|
-
- ✅ **Tailwind CSS** - Utility-first CSS framework
|
|
12
|
-
- ✅ **Biome.js** -
|
|
13
|
+
- ✅ **Tailwind CSS** - Utility-first CSS framework (v4)
|
|
14
|
+
- ✅ **Biome.js** - Ultra-fast linter and formatter
|
|
13
15
|
- ✅ **React Compiler** - Optimized React performance
|
|
14
16
|
- ✅ **Turbopack** - Fast bundler for development
|
|
15
17
|
- ✅ **pnpm** - Efficient package manager
|
|
16
18
|
|
|
19
|
+
### Optional Integrations
|
|
20
|
+
|
|
21
|
+
During setup, you can interactively choose to add:
|
|
22
|
+
|
|
23
|
+
- 🎨 **shadcn/ui** - Beautiful, accessible, copy-paste components.
|
|
24
|
+
- 📡 **TanStack Query** - Powerful asynchronous state management.
|
|
25
|
+
- 🚦 **@next/third-parties** - Optimized loading for third-party scripts.
|
|
26
|
+
- 📧 **Resend** - The best API for sending emails.
|
|
27
|
+
- ✉️ **React Email** - Build emails using React components.
|
|
28
|
+
- ⚡ **Supabase** - Open Source Firebase alternative (Auth, DB, Realtime).
|
|
29
|
+
- 🧪 **Testing Tools** - Vitest & React Testing Library (Unit/Integration testing).
|
|
30
|
+
- 📚 **Storybook** - Frontend workshop for UI development (Includes testing setup).
|
|
31
|
+
|
|
17
32
|
## Usage
|
|
18
33
|
|
|
19
|
-
###
|
|
34
|
+
### Recommended (pnpm)
|
|
20
35
|
|
|
21
36
|
```bash
|
|
22
|
-
|
|
37
|
+
pnpm create esa-stack@latest
|
|
23
38
|
```
|
|
24
39
|
|
|
25
|
-
###
|
|
40
|
+
### Other Package Managers
|
|
41
|
+
|
|
42
|
+
**npm**
|
|
26
43
|
|
|
27
44
|
```bash
|
|
28
|
-
|
|
45
|
+
npx create-esa-stack@latest
|
|
29
46
|
```
|
|
30
47
|
|
|
31
|
-
|
|
48
|
+
**yarn**
|
|
32
49
|
|
|
33
50
|
```bash
|
|
34
|
-
|
|
35
|
-
|
|
51
|
+
yarn create esa-stack
|
|
52
|
+
```
|
|
36
53
|
|
|
37
|
-
|
|
38
|
-
bun run dev
|
|
54
|
+
**bun**
|
|
39
55
|
|
|
40
|
-
|
|
41
|
-
bun
|
|
56
|
+
```bash
|
|
57
|
+
bun create esa-stack
|
|
42
58
|
```
|
|
43
59
|
|
|
60
|
+
### Interactive Flow
|
|
61
|
+
|
|
62
|
+
The CLI will guide you through the setup:
|
|
63
|
+
|
|
64
|
+
1. **Project Name**: Choose a name for your directory.
|
|
65
|
+
2. **Scaffolding**: Sets up the base Next.js application.
|
|
66
|
+
3. **Optional Packages**:
|
|
67
|
+
- *Install shadcn/ui?* (Default: Yes)
|
|
68
|
+
- *Install TanStack Query?* (Default: Yes)
|
|
69
|
+
- *Install @next/third-parties?* (Default: Yes)
|
|
70
|
+
- *Install Resend?* (Default: No)
|
|
71
|
+
- *Install React Email?* (Default: No)
|
|
72
|
+
- *Install Supabase?* (Default: Yes)
|
|
73
|
+
- *Install Storybook?* (Default: No)
|
|
74
|
+
- *If Yes*: Sets up Storybook environment.
|
|
75
|
+
- *If No*: Asks to install *Testing Tools (Vitest)* separately.
|
|
76
|
+
|
|
44
77
|
## How It Works
|
|
45
78
|
|
|
46
|
-
The CLI
|
|
79
|
+
The CLI wraps `create-next-app` with a specific set of high-performance flags:
|
|
47
80
|
|
|
48
81
|
```bash
|
|
49
82
|
npx create-next-app@latest <project-name> \
|
|
@@ -57,18 +90,16 @@ npx create-next-app@latest <project-name> \
|
|
|
57
90
|
--yes
|
|
58
91
|
```
|
|
59
92
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
Optional integrations available:
|
|
93
|
+
After scaffolding, it programmatically installs and configures selected integrations (e.g., running `shadcn init`, `storybook init`, etc.) so you're ready to code immediately.
|
|
63
94
|
|
|
64
|
-
|
|
65
|
-
- [x] **shadcn/ui** - Beautiful UI component library ✨
|
|
66
|
-
- [x] **resend** - Email API for sending emails ✨
|
|
95
|
+
## Contributing
|
|
67
96
|
|
|
68
|
-
|
|
97
|
+
Contributions are welcome!
|
|
69
98
|
|
|
70
|
-
|
|
71
|
-
|
|
99
|
+
1. Clone the repository.
|
|
100
|
+
2. Install dependencies: `bun install`
|
|
101
|
+
3. Run the CLI locally: `bun run dev`
|
|
102
|
+
4. Build: `bun run build`
|
|
72
103
|
|
|
73
104
|
## License
|
|
74
105
|
|
package/dist/cli.js
CHANGED
|
@@ -712,17 +712,29 @@ async function main() {
|
|
|
712
712
|
he("Operation cancelled.");
|
|
713
713
|
process.exit(0);
|
|
714
714
|
}
|
|
715
|
-
const
|
|
716
|
-
message: "Do you want to install
|
|
717
|
-
initialValue:
|
|
715
|
+
const installStorybook = await ce({
|
|
716
|
+
message: "Do you want to install Storybook?",
|
|
717
|
+
initialValue: false
|
|
718
718
|
});
|
|
719
|
-
if (typeof
|
|
719
|
+
if (typeof installStorybook === "symbol") {
|
|
720
720
|
he("Operation cancelled.");
|
|
721
721
|
process.exit(0);
|
|
722
722
|
}
|
|
723
|
+
let installTesting = false;
|
|
724
|
+
if (!installStorybook) {
|
|
725
|
+
const testing = await ce({
|
|
726
|
+
message: "Do you want to install Testing tools (Vitest + React Testing Library)?",
|
|
727
|
+
initialValue: true
|
|
728
|
+
});
|
|
729
|
+
if (typeof testing === "symbol") {
|
|
730
|
+
he("Operation cancelled.");
|
|
731
|
+
process.exit(0);
|
|
732
|
+
}
|
|
733
|
+
installTesting = testing;
|
|
734
|
+
}
|
|
723
735
|
const s = _2();
|
|
724
736
|
s.start("Scaffolding project...");
|
|
725
|
-
const command = `
|
|
737
|
+
const command = `npx create-next-app@latest ${projectName} --biome --ts --tailwind --react-compiler --app --src-dir --import-alias "@/*" --use-pnpm --turbopack --skip-install --yes`;
|
|
726
738
|
try {
|
|
727
739
|
s.stop("Starting scaffolding...");
|
|
728
740
|
execSync(command, { stdio: "inherit" });
|
|
@@ -733,7 +745,7 @@ Setting up shadcn/ui...`);
|
|
|
733
745
|
console.log("Installing dependencies...");
|
|
734
746
|
execSync("pnpm install", { stdio: "inherit", cwd: projectPath });
|
|
735
747
|
console.log("Initializing shadcn/ui...");
|
|
736
|
-
execSync("
|
|
748
|
+
execSync("npx shadcn@latest init", { stdio: "inherit", cwd: projectPath });
|
|
737
749
|
}
|
|
738
750
|
if (installTanstackQuery) {
|
|
739
751
|
console.log(`
|
|
@@ -805,6 +817,17 @@ Setting up Testing tools...`);
|
|
|
805
817
|
console.log("Installing Vitest, React Testing Library, and related tools...");
|
|
806
818
|
execSync("pnpm add vitest @vitejs/plugin-react jsdom @testing-library/react @testing-library/dom vite-tsconfig-paths -D -E", { stdio: "inherit", cwd: projectPath });
|
|
807
819
|
}
|
|
820
|
+
if (installStorybook) {
|
|
821
|
+
console.log(`
|
|
822
|
+
Setting up Storybook...`);
|
|
823
|
+
const hasNodeModules = existsSync(join(projectPath, "node_modules"));
|
|
824
|
+
if (!hasNodeModules) {
|
|
825
|
+
console.log("Installing dependencies...");
|
|
826
|
+
execSync("pnpm install", { stdio: "inherit", cwd: projectPath });
|
|
827
|
+
}
|
|
828
|
+
console.log("Installing Storybook...");
|
|
829
|
+
execSync("pnpm create storybook@latest --no-dev -y --package-manager pnpm", { stdio: "inherit", cwd: projectPath });
|
|
830
|
+
}
|
|
808
831
|
ge(`Successfully created ${projectName}!`);
|
|
809
832
|
} catch (error) {
|
|
810
833
|
s.stop("Failed to scaffold project.");
|