1.0.1 • Published 2 years ago
code-aggregator v1.0.1
Code Aggregator
Code Aggregator is a command-line tool that scans a specified directory and aggregates the contents of files with specific types into an output file.
Installation
To install Code Aggregator, run the following command:
npm install -g CodeAggregatorAfter installation, CodeAggregator will be available to use in any package.
Usage
You can use the Code Aggregator tool with the following command-line options:
- -d, --directory: Directory to scan (default: './').
- -t, --fileTypes: File types to include (default: '.js', '.html').
- -o, --output: Output file name (default: 'dirContents.txt').
Example
To scan the current directory for JavaScript and HTML files and output the contents to a file named myOutput.txt, run the following command:
CodeAggregator --directory ./ --fileTypes .js .html --output myOutput.txtHelp
You can access the help menu for more information by running:
CodeAggregator --helpCode Overview
The code utilizes the fs, path, and yargs modules to read the directory and file content, filter by file type, and write the aggregated content to the specified output file.