cvetrace
v0.1.0
Published
This directory contains the command-line interface for the **CVETrace** project. All development tasks are orchestrated via the `npm` scripts defined in [`package.json`](./package.json).
Readme
CVETrace CLI
This directory contains the command-line interface for the CVETrace project.
All development tasks are orchestrated via the npm scripts defined in package.json.
Getting started
Use Node >=18 Use the
nvmcommand toInstall dependencies once:
npm installRun the desired script with
npm run <script>(or the shorthand shown below).
Available npm scripts
| Script | Shorthand | Description |
| ------ | --------- | ----------- |
| build | npm run build | Compiles the TypeScript source in src/ into JavaScript in dist/ using tsc. Run this before publishing or whenever you change source code you intend to execute with node directly. |
| start | npm start | Executes the compiled CLI (dist/index.js) and points it at the sample project located in ../testapps/nodejs/cvetrace_test. Use this after you have run build, or when installing the package from npm. |
| dev | npm run dev | Runs the CLI directly from TypeScript sources using ts-node, again targeting the sample project path. This is the fastest way to iterate during development because it avoids a manual build step. |
| lint | npm run lint | Runs ESLint on all .ts/.tsx files under src/ using the rules defined in .eslintrc.json. Fix any reported issues before committing. |
Typical workflow
# 1. Install deps (only once per clone)
npm install
# 2. Lint as you code
npm run lint
# 3. Run in dev mode
npm run dev
# 4. When you are ready, build the distributable
npm run build
# 5. Test the compiled output
npm startLocal development symlink
You can create a global symlink so the cvetrace command on your machine always executes the local, editable copy of the code by running:
# inside the cli/ directory
npm linkAs soon as you run npm run build any changes you make are immediately reflected when you run cvetrace ... from any directory.
