pro-cpp-cli-core 1.0.1 → 1.0.3

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 (3) hide show
  1. package/README.md +64 -1
  2. package/index.js +7 -7
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1 +1,64 @@
1
- "# pro-cpp-cli-core"
1
+ # šŸš€ PRO C++ CLI Core
2
+
3
+ The ultimate Developer Experience (DX) for C++ on Windows. Inspired by Angular and .NET CLI.
4
+ Stop fighting with compilers, start writing code.
5
+
6
+ ## šŸ›  Prerequisites
7
+
8
+ This tool is designed for **Windows** and requires **Visual Studio 2022** (Community, Pro, or Enterprise).
9
+
10
+ 1. **Install C++ Workload:** Ensure "Desktop development with C++" is checked in Visual Studio Installer.
11
+ 2. **Node.js:** Install the latest LTS version.
12
+
13
+ ## šŸ“¦ Installation
14
+
15
+ ```cmd
16
+ npm install -g pro-cpp-cli-core
17
+ ```
18
+
19
+ šŸš€ Quick Start
20
+
21
+ 1. Create a new folder and open it in VS Code.
22
+
23
+ 2. Initialize the project:
24
+ ```cmd
25
+ procpp init
26
+ ```
27
+ 3. Start the magic watcher:
28
+ ```cmd
29
+ procpp watch
30
+ ```
31
+
32
+ ---
33
+
34
+ āš ļø Important: Terminal Setup
35
+ To use `procpp` inside VS Code terminal, you MUST use the Developer Environment:
36
+
37
+ 1. Press `Ctrl + Shift + P`.
38
+
39
+ 2. Type `Terminal: Select Default Profile`.
40
+
41
+ 3. Select `Developer PowerShell for VS 2022`.
42
+
43
+ 4. Open a NEW terminal.
44
+
45
+ Now `cl.exe` is recognized, and `procpp` can build your code!
46
+
47
+ ---
48
+
49
+ ✨ Features
50
+
51
+ • `procpp init`: Creates `main.cpp` and perfect `.vscode` configs for a "one-click" debugging experience (F5).
52
+
53
+ • `procpp run`: Compiles all `.cpp` files in the directory and runs them.
54
+
55
+ • `procpp watch`: Professional-grade hot-reload. It bypasses Antivirus locks by using unique executable naming and handles process recycling automatically.
56
+
57
+ ---
58
+
59
+ šŸž Debugging
60
+
61
+ Just press F5! Our `init` command sets up a "Bulletproof" debugger configuration that won't conflict with the watcher.
62
+
63
+ Created with ā¤ļø for the C++ Community.
64
+
package/index.js CHANGED
@@ -41,7 +41,7 @@ function getCppFiles() {
41
41
 
42
42
  // Command: procpp init
43
43
  function initProject() {
44
- console.log("šŸš€ Initializing PRO C++ Project...");
44
+ console.log("šŸš€ Initializing PRO C++ Project with C++20....");
45
45
 
46
46
  const vscodeDir = path.join(process.cwd(), '.vscode');
47
47
  if (!fs.existsSync(vscodeDir)) {
@@ -56,7 +56,7 @@ function initProject() {
56
56
  console.log("āœ… Created main.cpp");
57
57
  }
58
58
 
59
- // Generate tasks.json for bulletproof debugging
59
+ // Generate tasks.json with C++20
60
60
  const tasksContent = {
61
61
  "version": "2.0.0",
62
62
  "tasks": [
@@ -65,7 +65,7 @@ function initProject() {
65
65
  "label": "DEBUG-BUILD-MSVC",
66
66
  "command": "cl.exe",
67
67
  "args": [
68
- "/Zi", "/EHsc", "/nologo",
68
+ "/std:c++20", "/Zi", "/EHsc", "/nologo",
69
69
  "/Fe${fileDirname}\\debug_build_999.exe",
70
70
  "${file}"
71
71
  ],
@@ -97,7 +97,7 @@ function initProject() {
97
97
  };
98
98
  fs.writeFileSync(path.join(vscodeDir, 'launch.json'), JSON.stringify(launchContent, null, 4));
99
99
 
100
- console.log("āœ… Created .vscode debugger configs (F5 ready!)");
100
+ console.log("āœ… Created .vscode debugger configs (C++20 & F5 ready!)");
101
101
  console.log("šŸŽÆ Project initialized! Run 'procpp watch' to start developing.");
102
102
  }
103
103
 
@@ -123,8 +123,8 @@ function buildAndRun(isWatchMode = false) {
123
123
  const timestamp = Date.now();
124
124
  const outputExe = `app_build_${timestamp}.exe`;
125
125
 
126
- console.log(`\nšŸ”Ø Compiling...`);
127
- const compileCmd = `cl.exe /nologo /EHsc ${cppFiles} /Fe"${outputExe}"`;
126
+ console.log(`\nšŸ”Ø Compiling (Standard: C++20)...`);
127
+ const compileCmd = `cl.exe /std:c++20 /nologo /EHsc ${cppFiles} /Fe"${outputExe}"`;
128
128
 
129
129
  const success = runSyncCommand(compileCmd);
130
130
 
@@ -146,7 +146,7 @@ function buildAndRun(isWatchMode = false) {
146
146
 
147
147
  // Command: procpp watch
148
148
  function watchProject() {
149
- console.log("šŸ‘€ PRO C++ Watcher Started!");
149
+ console.log("šŸ‘€ PRO C++ Watcher Started (C++20 Mode)");
150
150
  console.log("Press Ctrl+C to stop. Watching for file changes...");
151
151
 
152
152
  // Initial build
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pro-cpp-cli-core",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/anton-po-github/pro-cpp-cli-core.git"