@donotdev/cli 0.0.3 → 0.0.4
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/dependencies-matrix.json +12 -24
- package/dist/bin/commands/bump.d.ts +1 -1
- package/dist/bin/commands/format.d.ts +1 -1
- package/dist/bin/commands/lint.d.ts +1 -1
- package/package.json +1 -9
- package/templates/app-demo/src/themes.css.example +108 -156
- package/templates/app-next/src/locales/home_en.json.example +6 -0
- package/templates/app-next/src/pages/HomePage.tsx.example +152 -8
- package/templates/app-next/src/themes.css.example +92 -140
- package/templates/app-vite/src/App.tsx.example +2 -2
- package/templates/app-vite/src/locales/home_en.json.example +6 -0
- package/templates/app-vite/src/pages/HomePage.tsx.example +149 -8
- package/templates/app-vite/src/themes.css.example +90 -138
- package/templates/root-consumer/guides/AGENT_START_HERE.md.example +83 -61
- package/templates/root-consumer/guides/COMPONENTS_ATOMIC.md.example +134 -0
- package/templates/root-consumer/guides/COMPONENTS_CRUD.md.example +70 -0
- package/templates/root-consumer/guides/COMPONENTS_UI.md.example +135 -0
- package/templates/root-consumer/guides/ENV_SETUP.md.example +14 -0
- package/templates/root-consumer/guides/INDEX.md.example +17 -25
- package/templates/root-consumer/guides/SETUP_AUTH.md.example +77 -0
- package/templates/root-consumer/guides/SETUP_BILLING.md.example +78 -0
- package/templates/root-consumer/guides/SETUP_FUNCTIONS.md.example +62 -0
- package/templates/root-consumer/guides/SETUP_I18N.md.example +48 -0
- package/templates/root-consumer/guides/SETUP_LAYOUTS.md.example +108 -0
- package/templates/root-consumer/guides/SETUP_OAUTH.md.example +53 -0
- package/templates/root-consumer/guides/SETUP_PAGES.md.example +112 -0
- package/templates/root-consumer/guides/SETUP_THEMES.md.example +107 -0
- package/templates/root-consumer/guides/advanced/COOKIE_REFERENCE.md.example +252 -0
- package/templates/root-consumer/guides/{EMULATOR_SETUP.md.example → advanced/EMULATORS.md.example} +1 -1
- package/templates/root-consumer/guides/{VERSION_CONTROL.md.example → advanced/VERSION_CONTROL.md.example} +0 -7
- package/templates/root-consumer/guides/AUTH_SETUP.md.example +0 -92
- package/templates/root-consumer/guides/BILLING_SETUP.md.example +0 -120
- package/templates/root-consumer/guides/CLI.md.example +0 -293
- package/templates/root-consumer/guides/COMPONENTS.md.example +0 -875
- package/templates/root-consumer/guides/FEATURES.md.example +0 -286
- package/templates/root-consumer/guides/FRAMEWORK_OVERVIEW.md.example +0 -97
- package/templates/root-consumer/guides/FUNCTIONS.md.example +0 -177
- package/templates/root-consumer/guides/GETTING_STARTED.md.example +0 -451
- package/templates/root-consumer/guides/HOW_TO_USE.md.example +0 -296
- package/templates/root-consumer/guides/I18N_SETUP.md.example +0 -204
- package/templates/root-consumer/guides/IMPORT_PATTERNS.md.example +0 -79
- package/templates/root-consumer/guides/INSTALLATION.md.example +0 -296
- package/templates/root-consumer/guides/LAYOUTS.md.example +0 -310
- package/templates/root-consumer/guides/PAGES_SETUP.md.example +0 -123
- package/templates/root-consumer/guides/STYLING.md.example +0 -273
- package/templates/root-consumer/guides/THEMING_SETUP.md.example +0 -119
- /package/templates/root-consumer/guides/{CONFIG_SETUP.md.example → SETUP_APP_CONFIG.md.example} +0 -0
- /package/templates/root-consumer/guides/{APP_CHECK_SETUP.md.example → advanced/APP_CHECK.md.example} +0 -0
|
@@ -1,293 +0,0 @@
|
|
|
1
|
-
# DoNotDev CLI Guide
|
|
2
|
-
|
|
3
|
-
**Status:** Up to date with implementation.
|
|
4
|
-
|
|
5
|
-
**Professional, cross-platform CLI for DoNotDev framework**
|
|
6
|
-
|
|
7
|
-
## Installation
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
bun install -g @donotdev/cli
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Getting Started
|
|
14
|
-
|
|
15
|
-
### Initialize a New Project
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
dndev init [project-name]
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Creates a new DoNotDev project. If no name is provided, creates in current directory.
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
cd my-project
|
|
25
|
-
bun install
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## App Commands
|
|
29
|
-
|
|
30
|
-
All app commands support smart app detection:
|
|
31
|
-
|
|
32
|
-
### Development
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
# Launch specific app in development mode
|
|
36
|
-
dndev dev:my-app
|
|
37
|
-
|
|
38
|
-
# If only one app exists, you can omit the app name
|
|
39
|
-
dndev dev
|
|
40
|
-
|
|
41
|
-
# If multiple apps exist, you'll be prompted to choose
|
|
42
|
-
dndev dev
|
|
43
|
-
# ? Select app: (Use arrow keys)
|
|
44
|
-
# > my-app
|
|
45
|
-
# admin-panel
|
|
46
|
-
# landing-page
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
The CLI automatically detects your Vite app and runs the dev server.
|
|
50
|
-
|
|
51
|
-
### Development with Emulators
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
# Launch app with Firebase emulators
|
|
55
|
-
dndev emu:my-app
|
|
56
|
-
|
|
57
|
-
# Smart detection works here too
|
|
58
|
-
dndev emu
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
### Build
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
# Build specific app for production (prompts for frontend/functions/both)
|
|
65
|
-
dndev build:my-app
|
|
66
|
-
|
|
67
|
-
# Build with explicit type
|
|
68
|
-
dndev build:my-app:front # Frontend only
|
|
69
|
-
dndev build:my-app:func # Functions only
|
|
70
|
-
dndev build:my-app:both # Both frontend and functions
|
|
71
|
-
|
|
72
|
-
# Smart detection
|
|
73
|
-
dndev build
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
**Build prompts:**
|
|
77
|
-
|
|
78
|
-
- If app has both frontend and functions:
|
|
79
|
-
```
|
|
80
|
-
? What would you like to build?
|
|
81
|
-
> Frontend only
|
|
82
|
-
Functions only
|
|
83
|
-
Both (frontend + functions)
|
|
84
|
-
```
|
|
85
|
-
- If app has only frontend or only functions, builds automatically
|
|
86
|
-
|
|
87
|
-
### Preview
|
|
88
|
-
|
|
89
|
-
```bash
|
|
90
|
-
# Preview production build (builds if needed)
|
|
91
|
-
dndev preview:my-app
|
|
92
|
-
|
|
93
|
-
# Smart detection
|
|
94
|
-
dndev preview
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
### Deploy
|
|
98
|
-
|
|
99
|
-
```bash
|
|
100
|
-
# Deploy app (asks what to deploy if both frontend and functions exist)
|
|
101
|
-
dndev deploy:my-app
|
|
102
|
-
|
|
103
|
-
# Smart detection
|
|
104
|
-
dndev deploy
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
**Deployment prompts:**
|
|
108
|
-
|
|
109
|
-
- If app has both frontend and functions:
|
|
110
|
-
```
|
|
111
|
-
? What would you like to deploy?
|
|
112
|
-
> Frontend only
|
|
113
|
-
Functions only
|
|
114
|
-
Both (frontend + functions)
|
|
115
|
-
```
|
|
116
|
-
- If app has only frontend or only functions, deploys automatically
|
|
117
|
-
|
|
118
|
-
## Utility Commands
|
|
119
|
-
|
|
120
|
-
### Format Code
|
|
121
|
-
|
|
122
|
-
```bash
|
|
123
|
-
dndev format
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
Formats code according to framework standards.
|
|
127
|
-
|
|
128
|
-
### Clean
|
|
129
|
-
|
|
130
|
-
```bash
|
|
131
|
-
dndev clean
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
Removes build artifacts, caches, and `node_modules`. Use when troubleshooting build issues, then it'll bun install
|
|
135
|
-
|
|
136
|
-
### Clear Caches
|
|
137
|
-
|
|
138
|
-
```bash
|
|
139
|
-
dndev cacheout
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
Clears build caches (`.turbo`, `.next`, `dist`, .vite, tsconfig.json.buildinfo, ...) without removing `node_modules`. Faster than `clean`.
|
|
143
|
-
Use when you've made many changes to your app to make sure you don't have stale code.
|
|
144
|
-
|
|
145
|
-
### Lint
|
|
146
|
-
|
|
147
|
-
```bash
|
|
148
|
-
# Check for linting issues
|
|
149
|
-
dndev lint
|
|
150
|
-
|
|
151
|
-
# Auto-fix linting issues
|
|
152
|
-
dndev lint:fix
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
## Smart App Detection
|
|
156
|
-
|
|
157
|
-
The CLI automatically detects apps in your project:
|
|
158
|
-
|
|
159
|
-
1. **Single app**: Commands work without specifying app name
|
|
160
|
-
|
|
161
|
-
```bash
|
|
162
|
-
dndev dev # Uses the only app automatically
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
2. **Multiple apps**: CLI prompts you to choose
|
|
166
|
-
|
|
167
|
-
```bash
|
|
168
|
-
dndev dev
|
|
169
|
-
# ? Select app:
|
|
170
|
-
# > my-app
|
|
171
|
-
# admin-panel
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
3. **Explicit app name**: Always works
|
|
175
|
-
```bash
|
|
176
|
-
dndev dev:my-app # Always uses my-app
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
## App Detection Logic
|
|
180
|
-
|
|
181
|
-
The CLI looks for apps in:
|
|
182
|
-
|
|
183
|
-
- `apps/*/package.json` (monorepo structure)
|
|
184
|
-
- `package.json` with `name` matching app pattern (single app projects)
|
|
185
|
-
|
|
186
|
-
For each app, it detects:
|
|
187
|
-
|
|
188
|
-
- **Framework**: Vite (SPA)
|
|
189
|
-
- **Backend**: Whether functions directory exists
|
|
190
|
-
- **Platform**: Firebase or Vercel (from config files)
|
|
191
|
-
|
|
192
|
-
## Examples
|
|
193
|
-
|
|
194
|
-
### Monorepo with Multiple Apps
|
|
195
|
-
|
|
196
|
-
```bash
|
|
197
|
-
# Project structure:
|
|
198
|
-
# apps/
|
|
199
|
-
# ├── web/ (Vite app)
|
|
200
|
-
# ├── admin/ (Vite app)
|
|
201
|
-
# └── api/ (Functions only)
|
|
202
|
-
|
|
203
|
-
# Develop web app
|
|
204
|
-
dndev dev:web
|
|
205
|
-
|
|
206
|
-
# Deploy admin app
|
|
207
|
-
dndev deploy:admin
|
|
208
|
-
# ? What would you like to deploy?
|
|
209
|
-
# > Frontend only
|
|
210
|
-
# Functions only
|
|
211
|
-
# Both
|
|
212
|
-
|
|
213
|
-
# Build all (if you have a build:all script)
|
|
214
|
-
dndev build
|
|
215
|
-
# ? Select app: web
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
### Single App Project
|
|
219
|
-
|
|
220
|
-
```bash
|
|
221
|
-
# Project structure:
|
|
222
|
-
# package.json
|
|
223
|
-
# src/
|
|
224
|
-
# functions/
|
|
225
|
-
|
|
226
|
-
# All commands work without app name
|
|
227
|
-
dndev dev # Automatically uses the app
|
|
228
|
-
dndev build # Automatically uses the app
|
|
229
|
-
dndev deploy # Automatically uses the app
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
## Cross-Platform Support
|
|
233
|
-
|
|
234
|
-
The CLI works seamlessly on:
|
|
235
|
-
|
|
236
|
-
- ✅ Windows (PowerShell, CMD)
|
|
237
|
-
- ✅ Windows Subsystem for Linux (WSL)
|
|
238
|
-
- ✅ macOS
|
|
239
|
-
- ✅ Linux
|
|
240
|
-
|
|
241
|
-
All commands use cross-platform path handling and work identically across platforms.
|
|
242
|
-
|
|
243
|
-
## Error Handling
|
|
244
|
-
|
|
245
|
-
The CLI provides clear error messages:
|
|
246
|
-
|
|
247
|
-
```bash
|
|
248
|
-
$ dndev dev:non-existent
|
|
249
|
-
❌ App "non-existent" not found.
|
|
250
|
-
|
|
251
|
-
Available apps:
|
|
252
|
-
- my-app
|
|
253
|
-
- admin-panel
|
|
254
|
-
|
|
255
|
-
Run 'dndev dev' to select interactively.
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
## Best Practices
|
|
259
|
-
|
|
260
|
-
1. **Use smart detection**: Omit app names when working with a single app
|
|
261
|
-
2. **Be explicit in CI/CD**: Always specify app names in scripts
|
|
262
|
-
3. **Use cacheout**: Clear caches before troubleshooting instead of full clean
|
|
263
|
-
4. **Format before commit**: Run `dndev format` before committing code
|
|
264
|
-
|
|
265
|
-
## Advanced Usage
|
|
266
|
-
|
|
267
|
-
### Environment Variables
|
|
268
|
-
|
|
269
|
-
The CLI respects environment variables:
|
|
270
|
-
|
|
271
|
-
```bash
|
|
272
|
-
# Skip build during deploy
|
|
273
|
-
SKIP_BUILD=true dndev deploy:my-app
|
|
274
|
-
|
|
275
|
-
# Verbose output
|
|
276
|
-
VERBOSE=true dndev build:my-app
|
|
277
|
-
```
|
|
278
|
-
|
|
279
|
-
### Custom Scripts
|
|
280
|
-
|
|
281
|
-
You can still use `package.json` scripts directly:
|
|
282
|
-
|
|
283
|
-
```bash
|
|
284
|
-
bun run dev:my-app
|
|
285
|
-
bun run build:my-app
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
But `dndev` commands provide:
|
|
289
|
-
|
|
290
|
-
- Cross-platform compatibility
|
|
291
|
-
- Smart app detection
|
|
292
|
-
- Consistent interface
|
|
293
|
-
- Better error messages
|