@voltx/cli 0.4.6 → 0.4.7

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/README.md +11 -6
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -62,20 +62,22 @@ Falls back to a 2-phase build (client + server) if no `src/entry-server.tsx` exi
62
62
 
63
63
  ## Project Structure
64
64
 
65
- All templates generate a full-stack project:
65
+ All templates generate a full-stack project with file-based routing:
66
66
 
67
67
  ```
68
68
  my-app/
69
- ├── api/ # Backend API routes (file-based routing)
69
+ ├── api/ # Backend API routes (auto-discovered via voltx/api)
70
70
  │ ├── index.ts # GET /api — health check
71
71
  │ ├── chat.ts # POST /api/chat (chatbot/agent-app)
72
72
  │ └── agent.ts # POST /api/agent (agent-app)
73
- ├── src/ # Frontend (React + Vite)
74
- │ ├── app.tsx # Root component
75
- ├── layout.tsx # Layout wrapper
73
+ ├── src/
74
+ │ ├── pages/ # Frontend pages (auto-discovered via voltx/router)
75
+ │ └── index.tsx # / — home page
76
+ │ ├── layout.tsx # Root layout wrapper
76
77
  │ ├── globals.css # Tailwind CSS v4
77
78
  │ ├── entry-client.tsx # Client hydration
78
79
  │ ├── entry-server.tsx # SSR rendering
80
+ │ ├── voltx-env.d.ts # Type declarations for voltx/router & voltx/api
79
81
  │ ├── components/ # React components
80
82
  │ ├── hooks/ # Custom hooks
81
83
  │ └── lib/ # Utilities (cn() if shadcn enabled)
@@ -83,7 +85,7 @@ my-app/
83
85
  ├── tools/ # Agent tools (agent-app)
84
86
  ├── public/ # Static assets (favicon, robots.txt, manifest)
85
87
  ├── server.ts # Hono app entry
86
- ├── vite.config.ts # Vite + Tailwind + dev server
88
+ ├── vite.config.ts # Vite + Tailwind + voltxRouter() + voltxAPI()
87
89
  ├── components.json # shadcn/ui config (if enabled)
88
90
  ├── voltx.config.ts # VoltX config
89
91
  └── tsconfig.json # TypeScript (with @/* path alias)
@@ -91,6 +93,9 @@ my-app/
91
93
 
92
94
  ## What's Included
93
95
 
96
+ - **File-based page routing** — `src/pages/*.tsx` auto-discovered via `voltxRouter()` Vite plugin
97
+ - **File-based API routing** — `api/**/*.ts` auto-discovered via `voltxAPI()` Vite plugin
98
+ - **Navigation** — `Link`, `NavLink`, `useNavigate`, `useParams` from `voltx/router`
94
99
  - **Tailwind CSS v4** — native Vite plugin, no PostCSS config needed
95
100
  - **Path aliases** — `@/*` maps to `src/*` in both TypeScript and Vite
96
101
  - **shadcn/ui** (optional) — `--shadcn` flag pre-configures `components.json`, `cn()` utility, and CSS variables
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voltx/cli",
3
- "version": "0.4.6",
3
+ "version": "0.4.7",
4
4
  "description": "VoltX CLI — dev server, build, start, generate, and scaffolding",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -16,7 +16,7 @@
16
16
  }
17
17
  },
18
18
  "dependencies": {
19
- "@voltx/core": "^0.4.6"
19
+ "@voltx/core": "^0.4.7"
20
20
  },
21
21
  "peerDependencies": {
22
22
  "tsx": ">=4.0.0",