A Gulp plugin for flexible file renaming during build pipelines.
gulp-rename is a plugin for the Gulp task runner that enables developers to rename files dynamically during build processes. It solves the problem of organizing output files, creating versioned assets, or restructuring directories by providing multiple renaming strategies within Gulp pipelines.
Frontend and Node.js developers using Gulp for build automation, asset processing, or static site generation who need to manipulate file paths programmatically.
Developers choose gulp-rename for its simplicity, seamless Gulp integration, and flexibility—offering fixed, object-based, and function-driven renaming without requiring external file operations.
Rename files easily
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports fixed strings, object-based configuration, and custom functions, allowing for everything from simple renames to complex path logic, as shown in the usage examples with dirname, basename, and extname manipulation.
Designed specifically for Gulp's streaming architecture, enabling easy pipelining with .pipe() without breaking the flow, evident from all code snippets in the README.
Allows independent manipulation of dirname, basename, prefix, suffix, and extname, providing precise control over file paths, demonstrated in the object-based configuration example.
Transformation functions receive the original file object as a second argument, enabling dynamic renaming based on file metadata, mentioned in the notes section.
The README notes that dirname behavior depends on glob-stream's base setting, which can lead to confusion and unexpected path outcomes if not handled carefully, especially with complex glob patterns.
Only functional within Gulp pipelines, making it irrelevant for projects using other build tools or needing standalone file operations, limiting its versatility.
Lacks pre-defined renaming patterns (e.g., batch numbering or regex replacements), forcing users to write custom functions for common but advanced scenarios, which can increase development time.