Skip to content

Conversation

@Mearman
Copy link
Member

@Mearman Mearman commented Jul 16, 2025

Summary

Implements the barrel command feature requested in #29, providing themed content aggregation capabilities by creating an alias to the existing index command.

Changes Made

🔧 Core Implementation

  • Added BarrelOperationOptions type for comprehensive barrel configuration
  • Created generateBarrel function as programmatic API alias to generateIndex
  • Implemented barrel CLI command with full feature parity to index command

📋 Features

  • Pattern Matching: Support for glob patterns (**/*.md)
  • Metadata Filtering: Filter by frontmatter properties
  • Multiple Grouping: Directory, metadata, or manual organization strategies
  • Output Formats: Links, import, embed, and hybrid modes
  • Template Support: Custom templates for barrel generation
  • TOC Generation: Optional table of contents for indexed files
  • Depth Control: Maximum traversal depth and boundary settings

🧪 Testing

  • Updated CLI tests to account for new barrel command
  • All existing tests pass with barrel functionality
  • Comprehensive test coverage maintained

📚 Documentation

  • Added barrel command to README key features
  • Included usage examples in quick start section
  • Updated MCP tools documentation
  • Comprehensive help text with barrel-focused terminology

Test Plan

  • Build and compile successfully
  • All existing tests pass
  • Barrel command help displays correctly
  • Barrel command functions identically to index command
  • Programmatic API works with generateBarrel function
  • Documentation updated and accurate

Examples

# Basic barrel creation
markmv barrel docs/ --type links --strategy directory

# Advanced barrel with metadata filtering and TOC
markmv barrel --type hybrid --strategy metadata --generate-toc

# Custom barrel with template
markmv barrel --type embed --template custom.md --max-depth 3

Notes

  • The barrel command is implemented as a direct alias to the index command
  • This approach ensures 100% compatibility and feature parity
  • All existing index functionality works seamlessly with barrel terminology
  • No breaking changes to existing functionality

Closes #29

Mearman added 6 commits July 16, 2025 12:22
- Add BarrelOperationOptions interface extending base operation options
- Include support for pattern matching, metadata filtering, and grouping
- Support custom templates and depth control for barrel file generation
- Add options for modification dates, file sizes, and update tracking

This type provides comprehensive configuration for barrel file operations
while maintaining consistency with existing operation patterns.
- Export BarrelOperationOptions type for programmatic usage
- Add generateBarrel function as direct alias to generateIndex
- Include comprehensive JSDoc documentation with examples
- Provide barrel-focused terminology while maintaining full compatibility

This enables programmatic barrel file generation with the same robust
functionality as the existing index generation system.
- Add comprehensive barrel command with all index command options
- Include barrel-specific help text and examples
- Maintain full compatibility with existing index functionality
- Support all organization strategies, output types, and features
- Add note clarifying alias relationship to index command

The barrel command provides themed content aggregation with familiar
terminology while leveraging the robust index generation infrastructure.
- Update action handler test to expect 8 commands instead of 7
- Include barrel command in test count alongside existing commands
- Maintain test accuracy with new command addition

This ensures test suite remains accurate after barrel command addition.
- Update generated API routes, MCP tools, and AJV validators
- Refresh schema generation timestamp
- Apply automatic code formatting to generated files

Generated files updated following schema regeneration process.
- Add barrel files feature to key features list
- Include barrel command example in quick start section
- Update MCP tools note to mention barrel command
- Provide barrel-focused examples and usage guidance

Documentation updated to reflect new barrel command functionality
and provide clear usage examples for themed content aggregation.
@Mearman Mearman linked an issue Jul 16, 2025 that may be closed by this pull request
@Mearman Mearman merged commit f149927 into main Jul 16, 2025
15 checks passed
@Mearman Mearman deleted the 29-feature-request-custom-barrel-files-for-themed-content-aggregation branch July 16, 2025 11:28
Mearman pushed a commit that referenced this pull request Jul 16, 2025
Includes auto-generated README and updated coverage badges

## [1.28.0](v1.27.0...v1.28.0) (2025-07-16)

### Features

* add barrel command for themed content aggregation ([#30](#30)) ([f149927](f149927))
@Mearman
Copy link
Member Author

Mearman commented Jul 16, 2025

🎉 This PR is included in version 1.28.0 🎉

The release is available on:

Installation

From NPM (Recommended)

npm install -g markmv@1.28.0

From GitHub Packages

npm install -g @mearman/markmv@1.28.0 --registry=https://npm.pkg.github.com

Security & Supply Chain

Build Provenance: Cryptographically signed build attestations
SBOM: Software Bill of Materials included in release
NPM Provenance: Published with npm provenance attestations
Multiple Registries: Available on both NPM and GitHub Packages

Test Coverage

This release includes comprehensive test coverage reports. View coverage details in the release assets.

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Custom Barrel Files for Themed Content Aggregation

2 participants