1.0.5 • Published 3 months ago
c_cpp-watcher v1.0.5
C/C++ Watcher (cw)
cw
is a simple CLI tool that automatically compiles and runs C/C++ files whenever they are modified, saving you time and effort.
Installation
To install cw
globally using npm, run:
npm install -g c_cpp-watcher
Prerequisites:
Make sure you have a C/C++ compiler installed (gcc
for C, g++
for C++). You can check by running:
gcc --version
g++ --version
Usage
cw <file.c or file.cpp> [compiler flags] [additional arguments]
Example Usage
cw main.cpp -Wall -std=c++17
This command watches main.cpp
, recompiles it with -Wall
and -std=c++17
flags, and runs the output.
- The compiled program automatically restarts when the file is modified.
- After execution, you can type
rs
and press Enter to restart manually.