create-croissant 0.1.11 → 0.1.12

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/template/README.md +33 -4
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.1.11",
6
+ "version": "0.1.12",
7
7
  "description": "Scaffold a new project using the Croissant Stack",
8
8
  "repository": {
9
9
  "type": "git",
@@ -19,9 +19,19 @@ npx create-croissant@latest
19
19
  - **API**: [oRPC](https://orpc.sh/) with a modular, namespaced router for end-to-end type-safety.
20
20
  - **Database**: [Drizzle ORM](https://orm.drizzle.team/) with PostgreSQL and Docker Compose setup.
21
21
  - **Styling**: [shadcn/ui](https://ui.shadcn.com/) components with Tailwind CSS.
22
- - **Monorepo**: Managed by [Turborepo](https://turbo.build/).
22
+ - **Monorepo**: Powered by [Turborepo](https://turbo.build/) for lightning-fast builds and smart task orchestration.
23
23
  - **Developer Experience**: Path aliases (`@/`), strict TypeScript, and automated linting/formatting.
24
24
 
25
+ ## 🚀 Monorepo Management with Turborepo
26
+
27
+ This project uses **Turborepo** to manage the monorepo efficiently. Turbo understands the dependency graph between our packages and optimizes our workflow in several ways:
28
+
29
+ - **Smart Caching**: Tasks like `build` and `lint` are cached. If the code hasn't changed, Turbo will replay the logs and output instantly.
30
+ - **Parallel Execution**: Run tasks across multiple packages simultaneously without stepping on each other's toes.
31
+ - **Task Pipelines**: Defines the relationship between tasks (e.g., "don't build the app until its dependencies are built").
32
+
33
+ You can see the configuration in `turbo.json`.
34
+
25
35
  ## 📁 Project Structure
26
36
 
27
37
  - `apps/web`: The main TanStack Start application. Uses `@/` path alias for clean imports.
@@ -83,16 +93,35 @@ The application will be available at `http://localhost:3000`.
83
93
 
84
94
  ## 📦 Scripts
85
95
 
96
+ All scripts are orchestrated by Turborepo. You can run them from the root directory:
97
+
86
98
  - `npm run dev`: Start all applications in development mode.
87
99
  - `npm run build`: Build all applications for production.
100
+ - `npm run lint`: Lint all packages (uses Turbo's caching).
101
+ - `npm run format`: Format all packages using Prettier.
102
+ - `npm run typecheck`: Run TypeScript type checking across the workspace.
103
+
104
+ ### 🗄️ Database Scripts
105
+
106
+ These handle Docker and Drizzle operations:
107
+
88
108
  - `npm run db:up`: Start the PostgreSQL Docker container.
89
109
  - `npm run db:down`: Stop and remove the database container.
90
110
  - `npm run db:logs`: Tail logs from the database container.
91
111
  - `npm run db:push --filter @workspace/db`: Push Drizzle schema to the database.
92
112
  - `npm run db:studio --filter @workspace/db`: Open Drizzle Studio to explore your data.
93
- - `npm run lint`: Lint all packages.
94
- - `npm run format`: Format all packages using Prettier.
95
- - `npm run typecheck`: Run TypeScript type checking.
113
+
114
+ ### 🎯 Filtering Tasks
115
+
116
+ Turbo allows you to run tasks for specific packages using the `--filter` flag:
117
+
118
+ ```bash
119
+ # Only lint the web app
120
+ npm run lint -- --filter web
121
+
122
+ # Build the db package and everything that depends on it
123
+ npm run build -- --filter @workspace/db...
124
+ ```
96
125
 
97
126
  ## 🔗 oRPC & Type Safety
98
127