debt-collector

1.0.0-alpha.9 • Public • Published

debt-collector

A nodejs util to identify, track and mesure technical debt in a project.

Note that debt-collector is an alpha version and you should consider that bugs may occur and API may change without warnings. As debt-collector is a tool that does not interfere with your code base, even buggy, it is relatively safe to use. Considering the previous informations, we recomend to install a fixed version of debt-collector as of now.

Developer Documentation

Prerequisites

  • Node.js >= 18
  • pnpm (recommended) or npm
  • Git

Installation

  1. Clone the repository:
git clone https://github.com/gael-boyenval/debt-collector.git
cd debt-collector
  1. Install dependencies:
pnpm install

Development Setup

  1. Build the project:
pnpm build
  1. For development with watch mode:
pnpm dev

Testing

The project uses Vitest for testing. Available test commands:

  • Run tests once:
pnpm test
  • Run tests in watch mode:
pnpm test:watch
  • Run tests with coverage:
pnpm test:coverage

Local Development and Testing

To test the CLI locally during development:

  1. Link the package globally:
pnpm link --global
  1. Now you can use the debt-collector command from anywhere to test your changes.

  2. To unlink when you're done:

pnpm unlink --global

Project Structure

debt-collector/
├── source/
│   ├── commands/     # CLI commands implementation
│   ├── components/   # React components for CLI UI
│   └── lib/         # Core library functionality
├── docs/            # Documentation
└── tests/           # Test files

Code Style

The project uses:

  • ESLint with XO React configuration
  • Prettier for code formatting
  • TypeScript for type safety

To lint your code:

pnpm lint

Building for Production

To create a production build:

pnpm build

The build output will be in the dist directory.

Contributing

  1. Create a new branch for your feature
  2. Make your changes
  3. Run tests and linting
  4. Submit a pull request

Troubleshooting

If you encounter any issues:

  1. Make sure you're using Node.js >= 18
  2. Clear your node_modules and reinstall dependencies:
rm -rf node_modules
pnpm install
  1. Check if the package is properly linked if testing locally:
which debt-collector

Readme

Keywords

Package Sidebar

Install

npm i debt-collector

Weekly Downloads

56

Version

1.0.0-alpha.9

License

ISC

Unpacked Size

143 kB

Total Files

131

Last publish

Collaborators

  • gael-boyenval