45 lines
1.7 KiB
Markdown
45 lines
1.7 KiB
Markdown
# TSPublish Project Overview
|
|
|
|
## Purpose
|
|
TSPublish is a tool designed to publish multiple, concise, and small packages from monorepos, specifically for TypeScript projects within a git environment. It helps manage and automate the publishing of individual packages from a monorepo structure.
|
|
|
|
## Tech Stack
|
|
- **Language**: TypeScript
|
|
- **Runtime**: Node.js
|
|
- **Package Manager**: pnpm (v10.11.0)
|
|
- **Build Tool**: @git.zone/tsbuild
|
|
- **Testing**: @git.zone/tstest with @push.rocks/tapbundle
|
|
- **CLI Framework**: @push.rocks/smartcli
|
|
- **Logging**: @push.rocks/smartlog (currently basic usage)
|
|
|
|
## Main Dependencies
|
|
- @push.rocks/smartcli - CLI interface
|
|
- @push.rocks/smartdelay - Delay utilities
|
|
- @push.rocks/smartfile - File operations
|
|
- @push.rocks/smartlog - Logging
|
|
- @push.rocks/smartnpm - NPM registry interactions
|
|
- @push.rocks/smartpath - Path utilities
|
|
- @push.rocks/smartrequest - HTTP requests
|
|
- @push.rocks/smartshell - Shell command execution
|
|
|
|
## Project Structure
|
|
- `ts/` - TypeScript source files
|
|
- `index.ts` - Main entry point
|
|
- `classes.tspublish.ts` - Main TsPublish class
|
|
- `classes.publishmodule.ts` - PublishModule class for individual packages
|
|
- `classes.giteaassets.ts` - Gitea assets management
|
|
- `logging.ts` - Logger configuration
|
|
- `plugins.ts` - External dependencies
|
|
- `paths.ts` - Path constants
|
|
- `interfaces/` - TypeScript interfaces
|
|
- `test/` - Test files
|
|
- `dist_ts/` - Compiled JavaScript output
|
|
- `cli.js` - CLI entry point (bin script)
|
|
|
|
## Key Features
|
|
1. Scans monorepo for directories starting with "ts"
|
|
2. Validates packages via tspublish.json files
|
|
3. Creates package.json dynamically for each module
|
|
4. Builds TypeScript code before publishing
|
|
5. Checks npm registry for version conflicts
|
|
6. Publishes packages to npm registry |