valence-cli 1.2.0 → 1.2.1

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 (44) hide show
  1. package/README.md +0 -18
  2. package/README.original.md +138 -0
  3. package/dist/commands/add.js +1 -1
  4. package/dist/commands/build.js +1 -1
  5. package/dist/commands/codegen.js +1 -1
  6. package/dist/commands/doctor.js +1 -1
  7. package/dist/commands/generate.js +1 -1
  8. package/dist/commands/lifecycle.js +1 -1
  9. package/dist/commands/new.d.ts +3 -1
  10. package/dist/commands/new.d.ts.map +1 -1
  11. package/dist/commands/new.js +1 -1
  12. package/dist/commands/new.js.map +1 -1
  13. package/dist/commands/publish.js +1 -1
  14. package/dist/commands/template.js +1 -1
  15. package/dist/index.js +1 -1
  16. package/dist/index.js.map +1 -1
  17. package/dist/templates/angular.d.ts +6 -0
  18. package/dist/templates/angular.d.ts.map +1 -0
  19. package/dist/templates/angular.js +1 -0
  20. package/dist/templates/angular.js.map +1 -0
  21. package/dist/templates/components.d.ts +4 -0
  22. package/dist/templates/components.d.ts.map +1 -0
  23. package/dist/templates/components.js +1 -0
  24. package/dist/templates/components.js.map +1 -0
  25. package/dist/templates/config.d.ts +2 -0
  26. package/dist/templates/config.d.ts.map +1 -0
  27. package/dist/templates/config.js +1 -0
  28. package/dist/templates/config.js.map +1 -0
  29. package/dist/templates/electron.d.ts +16 -0
  30. package/dist/templates/electron.d.ts.map +1 -0
  31. package/dist/templates/electron.js +1 -0
  32. package/dist/templates/electron.js.map +1 -0
  33. package/dist/templates/index.d.ts +5 -0
  34. package/dist/templates/index.d.ts.map +1 -0
  35. package/dist/templates/index.js +1 -0
  36. package/dist/templates/index.js.map +1 -0
  37. package/dist/templates.d.ts +1 -24
  38. package/dist/templates.d.ts.map +1 -1
  39. package/dist/templates.js +1 -1
  40. package/dist/templates.js.map +1 -1
  41. package/dist/utils/logger.js +1 -1
  42. package/dist/utils/update.js +1 -1
  43. package/dist/utils/validation.js +1 -1
  44. package/package.json +4 -1
package/README.md CHANGED
@@ -115,24 +115,6 @@ Diagnoses your development environment:
115
115
  - Verifies Git installation.
116
116
  - Checks for global Angular CLI (optional).
117
117
 
118
- ## 📂 Project Structure
119
-
120
- Valence enforces a clean, separated structure:
121
-
122
- ```text
123
- my-project/
124
- ├── electron/
125
- │ ├── main.ts # Main Process (Source)
126
- │ ├── preload.ts # Preload Script (Source)
127
- │ └── tsconfig.json # Electron TS Config
128
- ├── src/ # Angular App (Renderer)
129
- ├── dist/ # Build Output
130
- │ ├── browser/ # Angular Compilation
131
- │ └── electron/ # Electron Transpilation
132
- ├── forge.config.js # Packaging Config
133
- └── package.json
134
- ```
135
-
136
118
  ## License
137
119
 
138
120
  MIT
@@ -0,0 +1,138 @@
1
+ # Valence CLI
2
+
3
+ <p align="center">
4
+ <img src="https://img.shields.io/badge/Angular-DD0031?style=for-the-badge&logo=angular&logoColor=white" alt="Angular" />
5
+ <img src="https://img.shields.io/badge/Electron-47848F?style=for-the-badge&logo=electron&logoColor=white" alt="Electron" />
6
+ <img src="https://img.shields.io/badge/Babylon.js-BBBBBB?style=for-the-badge&logo=babylondotjs&logoColor=white" alt="Babylon.js" />
7
+ </p>
8
+
9
+ > **The ultimate scaffolding tool for hybrid 3D applications.**
10
+
11
+ **Valence CLI** automates the creation and management of high-performance desktop applications using **Angular**, **Electron**, and **Babylon.js**. It provides a robust, pre-configured environment with TypeScript support, build orchestration, and "production-ready" defaults.
12
+
13
+ ## 🚀 Installation
14
+
15
+ ```bash
16
+ npm install -g valence-cli
17
+ ```
18
+
19
+ ## ✨ Quick Start
20
+
21
+ Create a new project with the **Valence Identity** template (includes 3D scene, SVG logo, and debug HUD):
22
+
23
+ ```bash
24
+ valence new my-game
25
+ cd my-game
26
+ valence start
27
+ ```
28
+
29
+ ## 🛠 Commands
30
+
31
+ ### `valence new <name>`
32
+ Scaffolds a new project with:
33
+ - **Angular**: Latest CLI, SCSS, Routing.
34
+ - **Electron**: TypeScript Main/Preload processes, securely configured.
35
+ - **Babylon.js**: Core dependencies pre-installed.
36
+ - **Forge**: configured for building `.exe` / `.zip` / installers.
37
+ - **Template**: Includes a rotating plane, FPS counter, and camera position tracker.
38
+
39
+ ### `valence start`
40
+ Runs the application in **Development Mode**:
41
+ - Cleans previous builds.
42
+ - Builds Angular (Dev config).
43
+ - Compiles Electron (TypeScript).
44
+ - Launches Electron window with live reload enabled.
45
+
46
+ ### `valence build`
47
+ Compiles the application for **Production**:
48
+ - Outputs to `dist/browser` (Angular) and `dist/electron` (Main Process).
49
+ - Optimizes assets.
50
+ - Enforces relative paths (`baseHref="./"`) for Electron compatibility.
51
+
52
+ ### `valence package`
53
+ Packages the application for distribution:
54
+ - Runs `valence build`.
55
+ - Executes **Electron Forge** to generate installers (e.g., Windows Squirrel.exe, Zip).
56
+ - Artifacts saved to `out/`.
57
+
58
+ ### `valence publish`
59
+ Automates the release pipeline:
60
+ 1. Bumps project version (patch).
61
+ 2. Updates `README.md` version badges.
62
+ 3. Builds & Packages.
63
+ 4. Generates `RELEASES_README.md` entry.
64
+ 5. Publishes via Electron Forge (e.g., to GitHub Releases).
65
+
66
+ ### `valence generate scene <name>`
67
+ *Alias: `valence g scene <name>`*
68
+ Scaffolds a new **Babylon.js Scene component** in `src/app/scenes/<name>`:
69
+ - Pre-wired `Engine` and `Scene` creation.
70
+ - Includes Camera, Light, and Resize event handling.
71
+ - Ready for 3D logic immediately.
72
+
73
+ ### `valence generate bridge <name>`
74
+
75
+ *Alias: `valence g bridge <name>`*
76
+
77
+ Generates a type-safe IPC communication channel:
78
+
79
+ - Main Process: Registers `ipcMain.handle` listener.
80
+ - Preload: Exposes `contextBridge` API safe for Renderer.
81
+ - Service: Creates an Angular service wrapper to call the API.
82
+
83
+ ### `valence add <feature>`
84
+
85
+ Injects advanced capabilities into an existing project.
86
+
87
+ - `physics`: Installs Havok engine, configures WASM assets, and initializes physics in the global scene.
88
+ - `inspector`: Installs `@babylonjs/inspector` and binds `Ctrl+I` to toggle the dedicated 3D debugger overlay.
89
+ - `gui`: Installs `lil-gui` and creates a debug panel for tweaking parameters at runtime.
90
+ - `materials`: Installs `@babylonjs/materials`, enabling Grid, Gradient, and other advanced materials.
91
+ - `skybox`: Automatically creates a large skybox mesh to provide environmental context.
92
+ - `xr`: Initializes WebXR default experience (Teleportation + Controller support) for VR/AR.
93
+ - `tailwind`: Configures TailwindCSS with Angular (PostCSS, Config, Styles).
94
+
95
+ ### `valence template <type>`
96
+
97
+ Swaps the default 3D scene logic for a genre-specific starter.
98
+
99
+ - `fps`: First Person Shooter setup (WASD + Mouse Look + Gravity + Collisions).
100
+ - `orbit`: Product/Model Viewer setup (ArcRotateCamera + Studio Lighting).
101
+ - `platformer`: Third-person follow camera with a capsule character controller.
102
+ - `iso`: Isometric orthographic view (RTS/Strategy style) with tile grid,
103
+ - `gallery`: First-person interactive walkthrough with raycast-based highlighting.
104
+
105
+ ### `valence codegen assets`
106
+
107
+ Scans your `src/assets` folder and generates a TypeScript file (`core/asset-keys.ts`) with typed constants for every file path.
108
+
109
+ - Usage: `scene.createTexture(AssetKeys.TEXTURES_GRASS_PNG)`
110
+
111
+ ### `valence doctor`
112
+
113
+ Diagnoses your development environment:
114
+ - Checks Node.js & NPM versions.
115
+ - Verifies Git installation.
116
+ - Checks for global Angular CLI (optional).
117
+
118
+ ## 📂 Project Structure
119
+
120
+ Valence enforces a clean, separated structure:
121
+
122
+ ```text
123
+ my-project/
124
+ ├── electron/
125
+ │ ├── main.ts # Main Process (Source)
126
+ │ ├── preload.ts # Preload Script (Source)
127
+ │ └── tsconfig.json # Electron TS Config
128
+ ├── src/ # Angular App (Renderer)
129
+ ├── dist/ # Build Output
130
+ │ ├── browser/ # Angular Compilation
131
+ │ └── electron/ # Electron Transpilation
132
+ ├── forge.config.js # Packaging Config
133
+ └── package.json
134
+ ```
135
+
136
+ ## License
137
+
138
+ MIT