A versatile Node.js toolkit designed to simplify file processing tasks, with a focus on efficiency and ease of use. Currently supports File Grouping and CSS minification with plans for expanded functionality including media analysis, and more.
npm install -g turbotask-
File Grouping
- Automatically organize files by file type
- Handle nested directory processing
-
CSS Processing
- Minify CSS files by removing comments and whitespace
- Process single files or entire directories
- Maintain directory structures
- Safe processing with validation checks
- Media analysis
- More file processing capabilities (coming soon)
npm install -g turbotask# Clone the repository
git clone https://github.com/Fector101/TurboTask.git
# Navigate to the project directory
cd TurboTask/nodejs
# Install dependencies
npm install -g .turbotask group [optional_main_path]The argument:
- [optional_main_path] The main Folder the code will start the scan from (default is './' the folder the code is being ran from).
# Group files in current directory
turbotask group
# Group files in specific directory
turbotask group "C:/Users/Bob/Downloads"const {group} = require("turbotask")
// Groups are files in downloads folder
group('C:/Users/Bob/Downloads')
.then(details=>console.log(details))
// The resulting output will resemble:
// {
// 'Number of scanned folders': 100,
// 'Number of Moved Files': 467,
// Errors: []
// }
// Groups are files in current file directory
group('./')turbotask noWhiteSpace <input_css_path> [optional_output_path]The noWhiteSpace arguments:
- <input_css_path> can be a CSS file or Folder with CSS Files.
- [optional_output_path] Output directory (defaults to "TurboTask-output") can be changed to a File or Folder Path
turbotask noWhiteSpace rough.css clean.cssOR
turbotask noWhiteSpace ./styles ./minifiedconst {noWhiteSpace} = require("turbotask")
// For Single File
noWhiteSpace('main.css','main-new.css')
// For a Folder
noWhiteSpace('./styles','./minified')
noWhiteSpace('./','./minified')
// If you dont' want to Over-Write Original Files add a output folder
noWhiteSpace('','')The toolkit implements comprehensive error handling:
- File existence validation
- Directory creation verification
- Read/Write operation protection
- Format-specific validation (e.g., CSS comment structure)
- Colored error messages for visibility
The toolkit is designed for expansion. Planned features include:
-
File Organization
- Duplicate detection
-
Media Processing
- Duration analysis
- Format conversion
- Metadata extraction
-
General Utilities
- Advanced file manipulation
Contributions are welcome! The modular architecture makes it easy to add new features:
- Add new worker modules for specific file types
- Extend helper utilities for common operations
- Implement new CLI commands for new features
Common error messages and their meanings:
<Error - [filepath] Doesn't Exist>: File not foundFailed to create directory: Permission or path issues- Custom error messages can be specified for writeFile operations
Found a bug? Please open an issue on our GitHub Issues page.
- The toolkit is under active development
- New features will be added progressively
- Maintains backward compatibility with existing functionality
- Focuses on safe file operations with comprehensive error handling
If you find TurboTask helpful, consider buying me a coffee! Your support helps maintain and improve the project.
Your support helps me to:
- Maintain and improve TurboTask
- Web interface / API services
- Add new features
- Keep the project active
MIT © Fabian Joseph
- Fabian - fector101@yahoo.com
- GitHub: https://github.com/Fector101/TurboTask