0.4.0 โข Published 5 months ago
monoup v0.4.0
Monoup
A lightweight and flexible library packing tool designed specifically for monorepos. Build, version, and manage your monorepo packages with ease.
โจ Features
Build Features:
- ๐ฆ Multi-Format Output: Support for CJS and ESM formats
- ๐จ TypeScript Support: Full TypeScript support with declaration files
- โก Performance: Fast builds using esbuild and rollup
- ๐ Source Maps: Optional source map generation
- ๐ Progress Display: Real-time build progress
Version Management:
- ๐ Semver Support: Full semantic versioning compliance
- ๐ฆ Monorepo Sync: Maintains version consistency across packages
- ๐ท๏ธ Pre-release: Support for alpha, beta, and other pre-release tags
- โก Auto-update: Automatically updates dependent package versions
Publishing:
- ๐ Version Sync: Only publishes packages matching root version
- ๐ฆ Smart Package Order: Publishes in dependency order
- ๐ Version Check: Skips already published versions
- ๐จ Beautiful Output: Clean, formatted npm publish output
General Features:
- ๐ฏ Package Targeting: Target specific packages with
--package
option - ๐งน Clean Management: Smart cleaning of build artifacts
- ๐จ Beautiful CLI: Intuitive interface with colored output
- โ ๏ธ Error Handling: Detailed error reporting with proper exit codes
๐ Installation
npm install -D monoup
# or
yarn add -D monoup
# or
pnpm add -D monoup
๐ Usage
Build Command
# Build all packages
monoup build
# Build specific package
monoup build --package my-package
# Build with process display
monoup build --process
# Build for production
monoup build --production
Version Command
# Bump patch version (1.0.0 -> 1.0.1)
monoup version
# Bump specific version type
monoup version [major|minor|patch]
# Add/bump pre-release version
monoup version pre # 1.0.0 -> 1.0.0-alpha.0
monoup version pre --tag beta # 1.0.0 -> 1.0.0-beta.0
# Version specific package
monoup version --package my-package
Clean Command
# Clean all packages
monoup clean
# Clean specific package
monoup clean --package my-package
# Clean with verbose output
monoup clean --verbose
Publish Command
# Publish all packages that match root version
monoup publish
# Publish specific package
monoup publish --package my-package
# Publish with process display
monoup publish --process
โ๏ธ Configuration
Create a monoup.config.mjs
in your project root:
export default {
// Project structure
packagesDir: 'packages', // Monorepo packages directory
srcDir: 'src', // Source directory
outDir: 'lib', // Output directory
// Build configuration
build: {
// Output formats and extensions
formats: ['cjs', 'esm'],
extensions: {
cjs: '.js',
esm: '.mjs',
},
// Build options
target: 'ESNext', // Build target
sourcemap: true, // Generate source maps
// TypeScript configuration
typescript: {
enabled: true, // Enable TypeScript support
declaration: true, // Generate declaration files
},
},
// Display options
verbose: false, // Verbose logging
process: false, // Show build progress
};
๐ License
MIT ยฉ illuxiza