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.
- package/README.md +64 -1
- package/index.js +7 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1 +1,64 @@
|
|
|
1
|
-
|
|
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
|
|
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
|