Skip to content

Latest commit

 

History

History
48 lines (30 loc) · 1.38 KB

CLAUDE.md

File metadata and controls

48 lines (30 loc) · 1.38 KB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

Version-code is a TypeScript library for version number management and comparison (版本号管理、比较).

Build Commands

  • Build: pnpm build or tsup - Builds the project using tsup
  • Development: pnpm dev or tsup --watch - Watch mode for development
  • Test: pnpm test or vitest - Run tests using Vitest

Package Manager

This project uses pnpm (version 10.33.0). Always use pnpm commands instead of npm or yarn.

Project Structure

  • src/index.ts - Main entry point for the library
  • dist/ - Build output directory (generated by tsup)
  • tsup.config.ts - Build configuration
  • tsconfig.json - TypeScript configuration

Build System

The project uses tsup for building, which is a zero-config TypeScript bundler powered by esbuild. The build produces:

  • CommonJS output: dist/index.cjs
  • Source maps enabled

Testing

Uses Vitest (v4.1.5) for testing. Vitest is a Vite-native test runner that provides fast unit testing for TypeScript/JavaScript projects.

Code Style

  • 2-space indentation
  • UTF-8 encoding
  • LF line endings
  • Trailing whitespace trimmed
  • Final newline inserted
  • TypeScript strict mode enabled

Module System

This project uses ES modules ("type": "module" in package.json).