valence-cli 1.2.6 → 1.2.8

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